extension_resource_path_normalizer.h 929 B

1234567891011121314151617181920212223
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef EXTENSIONS_COMMON_EXTENSION_RESOURCE_PATH_NORMALIZER_H_
  5. #define EXTENSIONS_COMMON_EXTENSION_RESOURCE_PATH_NORMALIZER_H_
  6. #include <set>
  7. #include "base/files/file_path.h"
  8. // Normalize extension resource relative path. Removes ".". Returns false if
  9. // path can not be normalized, i.e. it references its parent or empty after
  10. // normalization.
  11. bool NormalizeExtensionResourcePath(const base::FilePath& path,
  12. base::FilePath* result);
  13. // Applies |NormalizeExtensionResourcePath| for each resource path and adds it
  14. // to result in the case of success.
  15. std::set<base::FilePath> NormalizeExtensionResourcePaths(
  16. const std::set<base::FilePath>& paths);
  17. #endif // EXTENSIONS_COMMON_EXTENSION_RESOURCE_PATH_NORMALIZER_H_