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

Side by Side Diff: chrome/common/extensions/extension_file_util.h

Issue 22470007: Add a "key" entry to InstallWarnings, remove InstallWarning::Format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_infrastructure
Patch Set: Created 7 years, 4 months 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool ValidateExtension(const extensions::Extension* extension, 81 bool ValidateExtension(const extensions::Extension* extension,
82 std::string* error, 82 std::string* error,
83 std::vector<extensions::InstallWarning>* warnings); 83 std::vector<extensions::InstallWarning>* warnings);
84 84
85 // Returns a list of paths (relative to the extension dir) for images that 85 // Returns a list of paths (relative to the extension dir) for images that
86 // the browser might load (like themes and page action icons) for the given 86 // the browser might load (like themes and page action icons) for the given
87 // extension. 87 // extension.
88 std::set<base::FilePath> GetBrowserImagePaths( 88 std::set<base::FilePath> GetBrowserImagePaths(
89 const extensions::Extension* extension); 89 const extensions::Extension* extension);
90 90
91
92 // Returns a list of files that contain private keys inside |extension_dir|. 91 // Returns a list of files that contain private keys inside |extension_dir|.
93 std::vector<base::FilePath> FindPrivateKeyFiles( 92 std::vector<base::FilePath> FindPrivateKeyFiles(
94 const base::FilePath& extension_dir); 93 const base::FilePath& extension_dir);
95 94
96 // Cleans up the extension install directory. It can end up with garbage in it 95 // Cleans up the extension install directory. It can end up with garbage in it
97 // if extensions can't initially be removed when they are uninstalled (eg if a 96 // if extensions can't initially be removed when they are uninstalled (eg if a
98 // file is in use). 97 // file is in use).
99 // 98 //
100 // |extensions_dir| is the install directory to look in. |extension_paths| is a 99 // |extensions_dir| is the install directory to look in. |extension_paths| is a
101 // map from extension id to full installation path. 100 // map from extension id to full installation path.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir); 142 base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir);
144 143
145 // Helper function to delete files. This is used to avoid ugly casts which 144 // Helper function to delete files. This is used to avoid ugly casts which
146 // would be necessary with PostMessage since base::Delete is overloaded. 145 // would be necessary with PostMessage since base::Delete is overloaded.
147 // TODO(skerner): Make a version of Delete that is not overloaded in file_util. 146 // TODO(skerner): Make a version of Delete that is not overloaded in file_util.
148 void DeleteFile(const base::FilePath& path, bool recursive); 147 void DeleteFile(const base::FilePath& path, bool recursive);
149 148
150 } // namespace extension_file_util 149 } // namespace extension_file_util
151 150
152 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ 151 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698