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

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

Issue 7585003: Fix to make Chromium more verbose about component extension loading error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed a call for ValidateExtension Created 9 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 | Annotate | Revision Log
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 26 matching lines...) Expand all
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 int flags, 42 int flags,
43 std::string* error); 43 std::string* error);
44 44
45 // Returns true if the given extension object is valid and consistent. 45 // Returns true if the given extension object is valid and consistent.
46 // Otherwise, a description of the error is returned in |error|. 46 // Otherwise, a description of the error is returned in |error|.
47 bool ValidateExtension(Extension* extension, std::string* error); 47 bool ValidateExtension(const Extension* extension, std::string* error);
48 48
49 // 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
50 // 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
51 // file is in use). 51 // file is in use).
52 // 52 //
53 // |extensions_dir| is the install directory to look in. |extension_paths| is a 53 // |extensions_dir| is the install directory to look in. |extension_paths| is a
54 // map from extension id to full installation path. 54 // map from extension id to full installation path.
55 // 55 //
56 // Obsolete version directories are removed, as are directories that aren't 56 // Obsolete version directories are removed, as are directories that aren't
57 // found in |extension_paths|. 57 // found in |extension_paths|.
(...skipping 25 matching lines...) Expand all
83 FilePath GetUserDataTempDir(); 83 FilePath GetUserDataTempDir();
84 84
85 // 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
86 // would be necessary with PostMessage since file_util::Delete is overloaded. 86 // would be necessary with PostMessage since file_util::Delete is overloaded.
87 // 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.
88 void DeleteFile(const FilePath& path, bool recursive); 88 void DeleteFile(const FilePath& path, bool recursive);
89 89
90 } // namespace extension_file_util 90 } // namespace extension_file_util
91 91
92 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_ 92 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_FILE_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/common/extensions/extension_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698