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

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

Issue 6766002: Replace bools in extension creation with flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <map> 10 #include <map>
(...skipping 21 matching lines...) Expand all
32 const FilePath& extensions_dir); 32 const FilePath& extensions_dir);
33 33
34 // Removes all versions of the extension with |id| from |extensions_dir|. 34 // Removes all versions of the extension with |id| from |extensions_dir|.
35 void UninstallExtension(const FilePath& extensions_dir, 35 void UninstallExtension(const FilePath& extensions_dir,
36 const std::string& id); 36 const std::string& id);
37 37
38 // Loads and validates an extension from the specified directory. Returns NULL 38 // Loads and validates an extension from the specified directory. Returns NULL
39 // on failure, with a description of the error in |error|. 39 // on failure, with a description of the error in |error|.
40 scoped_refptr<Extension> LoadExtension(const FilePath& extension_root, 40 scoped_refptr<Extension> LoadExtension(const FilePath& extension_root,
41 Extension::Location location, 41 Extension::Location location,
42 bool require_key, 42 int flags,
43 bool strict_error_checks,
44 std::string* error); 43 std::string* error);
45 44
46 // Returns true if the given extension object is valid and consistent. 45 // Returns true if the given extension object is valid and consistent.
47 // Otherwise, a description of the error is returned in |error|. 46 // Otherwise, a description of the error is returned in |error|.
48 bool ValidateExtension(Extension* extension, std::string* error); 47 bool ValidateExtension(Extension* extension, std::string* error);
49 48
50 // Cleans up the extension install directory. It can end up with garbage in it 49 // Cleans up the extension install directory. It can end up with garbage in it
51 // if extensions can't initially be removed when they are uninstalled (eg if a 50 // if extensions can't initially be removed when they are uninstalled (eg if a
52 // file is in use). 51 // file is in use).
53 // 52 //
(...skipping 30 matching lines...) Expand all
84 FilePath GetUserDataTempDir(); 83 FilePath GetUserDataTempDir();
85 84
86 // Helper function to delete files. This is used to avoid ugly casts which 85 // Helper function to delete files. This is used to avoid ugly casts which
87 // would be necessary with PostMessage since file_util::Delete is overloaded. 86 // would be necessary with PostMessage since file_util::Delete is overloaded.
88 // TODO(skerner): Make a version of Delete that is not overloaded in file_util. 87 // TODO(skerner): Make a version of Delete that is not overloaded in file_util.
89 void DeleteFile(const FilePath& path, bool recursive); 88 void DeleteFile(const FilePath& path, bool recursive);
90 89
91 } // namespace extension_file_util 90 } // namespace extension_file_util
92 91
93 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ 92 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698