Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(946)

Side by Side Diff: extensions/common/file_util.h

Issue 1541113003: Revert of Change extension icon load errors to warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_COMMON_FILE_UTIL_H_ 5 #ifndef EXTENSIONS_COMMON_FILE_UTIL_H_
6 #define EXTENSIONS_COMMON_FILE_UTIL_H_ 6 #define EXTENSIONS_COMMON_FILE_UTIL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 scoped_ptr<base::DictionaryValue> LoadManifest( 65 scoped_ptr<base::DictionaryValue> LoadManifest(
66 const base::FilePath& extension_root, 66 const base::FilePath& extension_root,
67 std::string* error); 67 std::string* error);
68 68
69 // Convenience overload for specifying a manifest filename. 69 // Convenience overload for specifying a manifest filename.
70 scoped_ptr<base::DictionaryValue> LoadManifest( 70 scoped_ptr<base::DictionaryValue> LoadManifest(
71 const base::FilePath& extension_root, 71 const base::FilePath& extension_root,
72 const base::FilePath::CharType* manifest_filename, 72 const base::FilePath::CharType* manifest_filename,
73 std::string* error); 73 std::string* error);
74 74
75 // Returns true if the given file path exists and is not zero-length.
76 bool ValidateFilePath(const base::FilePath& path);
77
78 // Returns true if the given extension object is valid and consistent. 75 // Returns true if the given extension object is valid and consistent.
79 // May also append a series of warning messages to |warnings|, but they 76 // May also append a series of warning messages to |warnings|, but they
80 // should not prevent the extension from running. 77 // should not prevent the extension from running.
81 // 78 //
82 // Otherwise, returns false, and a description of the error is 79 // Otherwise, returns false, and a description of the error is
83 // returned in |error|. 80 // returned in |error|.
84 bool ValidateExtension(const Extension* extension, 81 bool ValidateExtension(const Extension* extension,
85 std::string* error, 82 std::string* error,
86 std::vector<InstallWarning>* warnings); 83 std::vector<InstallWarning>* warnings);
87 84
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 const ExtensionSet& extension_set); 148 const ExtensionSet& extension_set);
152 149
153 // Helper functions for getting paths for files used in content verification. 150 // Helper functions for getting paths for files used in content verification.
154 base::FilePath GetVerifiedContentsPath(const base::FilePath& extension_path); 151 base::FilePath GetVerifiedContentsPath(const base::FilePath& extension_path);
155 base::FilePath GetComputedHashesPath(const base::FilePath& extension_path); 152 base::FilePath GetComputedHashesPath(const base::FilePath& extension_path);
156 153
157 } // namespace file_util 154 } // namespace file_util
158 } // namespace extensions 155 } // namespace extensions
159 156
160 #endif // EXTENSIONS_COMMON_FILE_UTIL_H_ 157 #endif // EXTENSIONS_COMMON_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/browser_action/multi_icons/manifest.json ('k') | extensions/common/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698