OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/file_path.h" | 16 #include "base/file_path.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/hash_tables.h" | 18 #include "base/hash_tables.h" |
19 #include "base/memory/linked_ptr.h" | 19 #include "base/memory/linked_ptr.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
22 #include "base/synchronization/lock.h" | 22 #include "base/synchronization/lock.h" |
23 #include "base/threading/thread_checker.h" | 23 #include "base/threading/thread_checker.h" |
24 #include "chrome/common/extensions/extension_constants.h" | 24 #include "chrome/common/extensions/extension_constants.h" |
25 #include "chrome/common/extensions/extension_icon_set.h" | 25 #include "chrome/common/extensions/extension_icon_set.h" |
| 26 #include "chrome/common/extensions/manifest.h" |
26 #include "chrome/common/extensions/permissions/api_permission.h" | 27 #include "chrome/common/extensions/permissions/api_permission.h" |
27 #include "chrome/common/extensions/permissions/api_permission_set.h" | 28 #include "chrome/common/extensions/permissions/api_permission_set.h" |
28 #include "chrome/common/extensions/permissions/permission_message.h" | 29 #include "chrome/common/extensions/permissions/permission_message.h" |
29 #include "chrome/common/extensions/user_script.h" | 30 #include "chrome/common/extensions/user_script.h" |
| 31 #include "extensions/common/install_warning.h" |
30 #include "extensions/common/url_pattern.h" | 32 #include "extensions/common/url_pattern.h" |
31 #include "extensions/common/url_pattern_set.h" | 33 #include "extensions/common/url_pattern_set.h" |
32 #include "googleurl/src/gurl.h" | 34 #include "googleurl/src/gurl.h" |
33 #include "ui/base/accelerators/accelerator.h" | 35 #include "ui/base/accelerators/accelerator.h" |
34 #include "ui/gfx/size.h" | 36 #include "ui/gfx/size.h" |
35 | 37 |
36 class ExtensionAction; | 38 class ExtensionAction; |
37 class ExtensionResource; | 39 class ExtensionResource; |
38 class SkBitmap; | 40 class SkBitmap; |
39 class Version; | 41 class Version; |
40 | 42 |
41 namespace base { | 43 namespace base { |
42 class DictionaryValue; | 44 class DictionaryValue; |
43 class ListValue; | 45 class ListValue; |
44 } | 46 } |
45 | 47 |
46 namespace gfx { | 48 namespace gfx { |
47 class ImageSkia; | 49 class ImageSkia; |
48 } | 50 } |
49 | 51 |
50 FORWARD_DECLARE_TEST(TabStripModelTest, Apps); | 52 FORWARD_DECLARE_TEST(TabStripModelTest, Apps); |
51 | 53 |
52 namespace extensions { | 54 namespace extensions { |
53 struct ActionInfo; | 55 struct ActionInfo; |
54 class Manifest; | |
55 class PermissionSet; | 56 class PermissionSet; |
56 | 57 |
57 typedef std::set<std::string> OAuth2Scopes; | 58 typedef std::set<std::string> OAuth2Scopes; |
58 | 59 |
59 // Represents a Chrome extension. | 60 // Represents a Chrome extension. |
60 class Extension : public base::RefCountedThreadSafe<Extension> { | 61 class Extension : public base::RefCountedThreadSafe<Extension> { |
61 public: | 62 public: |
62 struct InstallWarning; | |
63 struct ManifestData; | 63 struct ManifestData; |
64 | 64 |
65 typedef std::vector<std::string> ScriptingWhitelist; | 65 typedef std::vector<std::string> ScriptingWhitelist; |
66 typedef std::vector<InstallWarning> InstallWarningVector; | |
67 typedef std::map<const std::string, linked_ptr<ManifestData> > | 66 typedef std::map<const std::string, linked_ptr<ManifestData> > |
68 ManifestDataMap; | 67 ManifestDataMap; |
69 | 68 |
70 // What an extension was loaded from. | |
71 // NOTE: These values are stored as integers in the preferences and used | |
72 // in histograms so don't remove or reorder existing items. Just append | |
73 // to the end. | |
74 enum Location { | |
75 INVALID, | |
76 INTERNAL, // A crx file from the internal Extensions directory. | |
77 EXTERNAL_PREF, // A crx file from an external directory (via prefs). | |
78 EXTERNAL_REGISTRY, // A crx file from an external directory (via eg the | |
79 // registry on Windows). | |
80 LOAD, // --load-extension. | |
81 COMPONENT, // An integral component of Chrome itself, which | |
82 // happens to be implemented as an extension. We don't | |
83 // show these in the management UI. | |
84 EXTERNAL_PREF_DOWNLOAD, // A crx file from an external directory (via | |
85 // prefs), installed from an update URL. | |
86 EXTERNAL_POLICY_DOWNLOAD, // A crx file from an external directory (via | |
87 // admin policies), installed from an update URL. | |
88 | |
89 NUM_LOCATIONS | |
90 }; | |
91 | |
92 enum State { | 69 enum State { |
93 DISABLED = 0, | 70 DISABLED = 0, |
94 ENABLED, | 71 ENABLED, |
95 // An external extension that the user uninstalled. We should not reinstall | 72 // An external extension that the user uninstalled. We should not reinstall |
96 // such extensions on startup. | 73 // such extensions on startup. |
97 EXTERNAL_EXTENSION_UNINSTALLED, | 74 EXTERNAL_EXTENSION_UNINSTALLED, |
98 // Special state for component extensions, since they are always loaded by | 75 // Special state for component extensions, since they are always loaded by |
99 // the component loader, and should never be auto-installed on startup. | 76 // the component loader, and should never be auto-installed on startup. |
100 ENABLED_COMPONENT, | 77 ENABLED_COMPONENT, |
101 NUM_STATES | 78 NUM_STATES |
(...skipping 19 matching lines...) Expand all Loading... |
121 }; | 98 }; |
122 | 99 |
123 enum InstallType { | 100 enum InstallType { |
124 INSTALL_ERROR, | 101 INSTALL_ERROR, |
125 DOWNGRADE, | 102 DOWNGRADE, |
126 REINSTALL, | 103 REINSTALL, |
127 UPGRADE, | 104 UPGRADE, |
128 NEW_INSTALL | 105 NEW_INSTALL |
129 }; | 106 }; |
130 | 107 |
131 // Do not change the order of entries or remove entries in this list | |
132 // as this is used in UMA_HISTOGRAM_ENUMERATIONs about extensions. | |
133 enum Type { | |
134 TYPE_UNKNOWN = 0, | |
135 TYPE_EXTENSION, | |
136 TYPE_THEME, | |
137 TYPE_USER_SCRIPT, | |
138 TYPE_HOSTED_APP, | |
139 // This is marked legacy because platform apps are preferred. For | |
140 // backwards compatibility, we can't remove support for packaged apps | |
141 TYPE_LEGACY_PACKAGED_APP, | |
142 TYPE_PLATFORM_APP | |
143 }; | |
144 | |
145 enum SyncType { | 108 enum SyncType { |
146 SYNC_TYPE_NONE = 0, | 109 SYNC_TYPE_NONE = 0, |
147 SYNC_TYPE_EXTENSION, | 110 SYNC_TYPE_EXTENSION, |
148 SYNC_TYPE_APP | 111 SYNC_TYPE_APP |
149 }; | 112 }; |
150 | 113 |
151 // Declared requirements for the extension. | 114 // Declared requirements for the extension. |
152 struct Requirements { | 115 struct Requirements { |
153 Requirements(); | 116 Requirements(); |
154 ~Requirements(); | 117 ~Requirements(); |
(...skipping 19 matching lines...) Expand all Loading... |
174 struct OAuth2Info { | 137 struct OAuth2Info { |
175 OAuth2Info(); | 138 OAuth2Info(); |
176 ~OAuth2Info(); | 139 ~OAuth2Info(); |
177 | 140 |
178 OAuth2Scopes GetScopesAsSet(); | 141 OAuth2Scopes GetScopesAsSet(); |
179 | 142 |
180 std::string client_id; | 143 std::string client_id; |
181 std::vector<std::string> scopes; | 144 std::vector<std::string> scopes; |
182 }; | 145 }; |
183 | 146 |
184 struct InstallWarning { | |
185 enum Format { | |
186 // IMPORTANT: Do not build HTML strings from user or developer-supplied | |
187 // input. | |
188 FORMAT_TEXT, | |
189 FORMAT_HTML, | |
190 }; | |
191 InstallWarning(Format format, const std::string& message) | |
192 : format(format), message(message) { | |
193 } | |
194 bool operator==(const InstallWarning& other) const; | |
195 Format format; | |
196 std::string message; | |
197 }; | |
198 | |
199 // A base class for parsed manifest data that APIs want to store on | 147 // A base class for parsed manifest data that APIs want to store on |
200 // the extension. Related to base::SupportsUserData, but with an immutable | 148 // the extension. Related to base::SupportsUserData, but with an immutable |
201 // thread-safe interface to match Extension. | 149 // thread-safe interface to match Extension. |
202 struct ManifestData { | 150 struct ManifestData { |
203 virtual ~ManifestData() {} | 151 virtual ~ManifestData() {} |
204 }; | 152 }; |
205 | 153 |
206 enum InitFromValueFlags { | 154 enum InitFromValueFlags { |
207 NO_FLAGS = 0, | 155 NO_FLAGS = 0, |
208 | 156 |
(...skipping 29 matching lines...) Expand all Loading... |
238 // |ERROR_ON_PRIVATE_KEY| means that private keys inside an | 186 // |ERROR_ON_PRIVATE_KEY| means that private keys inside an |
239 // extension should be errors rather than warnings. | 187 // extension should be errors rather than warnings. |
240 ERROR_ON_PRIVATE_KEY = 1 << 6, | 188 ERROR_ON_PRIVATE_KEY = 1 << 6, |
241 | 189 |
242 // |WAS_INSTALLED_BY_DEFAULT| installed by default when the profile was | 190 // |WAS_INSTALLED_BY_DEFAULT| installed by default when the profile was |
243 // created. | 191 // created. |
244 WAS_INSTALLED_BY_DEFAULT = 1 << 7, | 192 WAS_INSTALLED_BY_DEFAULT = 1 << 7, |
245 }; | 193 }; |
246 | 194 |
247 static scoped_refptr<Extension> Create(const FilePath& path, | 195 static scoped_refptr<Extension> Create(const FilePath& path, |
248 Location location, | 196 Manifest::Location location, |
249 const base::DictionaryValue& value, | 197 const base::DictionaryValue& value, |
250 int flags, | 198 int flags, |
251 std::string* error); | 199 std::string* error); |
252 | 200 |
253 // In a few special circumstances, we want to create an Extension and give it | 201 // In a few special circumstances, we want to create an Extension and give it |
254 // an explicit id. Most consumers should just use the other Create() method. | 202 // an explicit id. Most consumers should just use the other Create() method. |
255 static scoped_refptr<Extension> Create(const FilePath& path, | 203 static scoped_refptr<Extension> Create(const FilePath& path, |
256 Location location, | 204 Manifest::Location location, |
257 const base::DictionaryValue& value, | 205 const base::DictionaryValue& value, |
258 int flags, | 206 int flags, |
259 const std::string& explicit_id, | 207 const std::string& explicit_id, |
260 std::string* error); | 208 std::string* error); |
261 | 209 |
262 // Given two install sources, return the one which should take priority | |
263 // over the other. If an extension is installed from two sources A and B, | |
264 // its install source should be set to GetHigherPriorityLocation(A, B). | |
265 static Location GetHigherPriorityLocation(Location loc1, Location loc2); | |
266 | |
267 // Max size (both dimensions) for browser and page actions. | 210 // Max size (both dimensions) for browser and page actions. |
268 static const int kPageActionIconMaxSize; | 211 static const int kPageActionIconMaxSize; |
269 static const int kBrowserActionIconMaxSize; | 212 static const int kBrowserActionIconMaxSize; |
270 | 213 |
271 // Valid schemes for web extent URLPatterns. | 214 // Valid schemes for web extent URLPatterns. |
272 static const int kValidWebExtentSchemes; | 215 static const int kValidWebExtentSchemes; |
273 | 216 |
274 // Valid schemes for host permission URLPatterns. | 217 // Valid schemes for host permission URLPatterns. |
275 static const int kValidHostPermissionSchemes; | 218 static const int kValidHostPermissionSchemes; |
276 | 219 |
(...skipping 19 matching lines...) Expand all Loading... |
296 // Checks to see if the extension has a valid ID. | 239 // Checks to see if the extension has a valid ID. |
297 static bool IdIsValid(const std::string& id); | 240 static bool IdIsValid(const std::string& id); |
298 | 241 |
299 // Generate an ID for an extension in the given path. | 242 // Generate an ID for an extension in the given path. |
300 // Used while developing extensions, before they have a key. | 243 // Used while developing extensions, before they have a key. |
301 static std::string GenerateIdForPath(const FilePath& file_name); | 244 static std::string GenerateIdForPath(const FilePath& file_name); |
302 | 245 |
303 // Returns true if the specified file is an extension. | 246 // Returns true if the specified file is an extension. |
304 static bool IsExtension(const FilePath& file_name); | 247 static bool IsExtension(const FilePath& file_name); |
305 | 248 |
306 // Whether the |location| is external or not. | |
307 static inline bool IsExternalLocation(Location location) { | |
308 return location == Extension::EXTERNAL_PREF || | |
309 location == Extension::EXTERNAL_REGISTRY || | |
310 location == Extension::EXTERNAL_PREF_DOWNLOAD || | |
311 location == Extension::EXTERNAL_POLICY_DOWNLOAD; | |
312 } | |
313 | |
314 // Whether extensions with |location| are auto-updatable or not. | |
315 static inline bool IsAutoUpdateableLocation(Location location) { | |
316 // Only internal and external extensions can be autoupdated. | |
317 return location == Extension::INTERNAL || | |
318 IsExternalLocation(location); | |
319 } | |
320 | |
321 // Unpacked extensions start off with file access since they are a developer | |
322 // feature. | |
323 static inline bool ShouldAlwaysAllowFileAccess(Location location) { | |
324 return location == Extension::LOAD; | |
325 } | |
326 | |
327 // Fills the |info| dictionary with basic information about the extension. | 249 // Fills the |info| dictionary with basic information about the extension. |
328 // |enabled| is injected for easier testing. | 250 // |enabled| is injected for easier testing. |
329 void GetBasicInfo(bool enabled, base::DictionaryValue* info) const; | 251 void GetBasicInfo(bool enabled, base::DictionaryValue* info) const; |
330 | 252 |
331 // See Type definition above. | 253 // See Type definition in Manifest. |
332 Type GetType() const; | 254 Manifest::Type GetType() const; |
333 | 255 |
334 // Returns an absolute url to a resource inside of an extension. The | 256 // Returns an absolute url to a resource inside of an extension. The |
335 // |extension_url| argument should be the url() from an Extension object. The | 257 // |extension_url| argument should be the url() from an Extension object. The |
336 // |relative_path| can be untrusted user input. The returned URL will either | 258 // |relative_path| can be untrusted user input. The returned URL will either |
337 // be invalid() or a child of |extension_url|. | 259 // be invalid() or a child of |extension_url|. |
338 // NOTE: Static so that it can be used from multiple threads. | 260 // NOTE: Static so that it can be used from multiple threads. |
339 static GURL GetResourceURL(const GURL& extension_url, | 261 static GURL GetResourceURL(const GURL& extension_url, |
340 const std::string& relative_path); | 262 const std::string& relative_path); |
341 GURL GetResourceURL(const std::string& relative_path) const { | 263 GURL GetResourceURL(const std::string& relative_path) const { |
342 return GetResourceURL(url(), relative_path); | 264 return GetResourceURL(url(), relative_path); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 // Sets |data| to be associated with the key. Takes ownership of |data|. | 503 // Sets |data| to be associated with the key. Takes ownership of |data|. |
582 // Can only be called before InitValue is finished. Not thread-safe; | 504 // Can only be called before InitValue is finished. Not thread-safe; |
583 // all SetManifestData calls should be on only one thread. | 505 // all SetManifestData calls should be on only one thread. |
584 void SetManifestData(const std::string& key, ManifestData* data); | 506 void SetManifestData(const std::string& key, ManifestData* data); |
585 | 507 |
586 // Accessors: | 508 // Accessors: |
587 | 509 |
588 const Requirements& requirements() const { return requirements_; } | 510 const Requirements& requirements() const { return requirements_; } |
589 const FilePath& path() const { return path_; } | 511 const FilePath& path() const { return path_; } |
590 const GURL& url() const { return extension_url_; } | 512 const GURL& url() const { return extension_url_; } |
591 Location location() const; | 513 Manifest::Location location() const; |
592 const std::string& id() const; | 514 const std::string& id() const; |
593 const Version* version() const { return version_.get(); } | 515 const Version* version() const { return version_.get(); } |
594 const std::string VersionString() const; | 516 const std::string VersionString() const; |
595 const std::string& name() const { return name_; } | 517 const std::string& name() const { return name_; } |
596 const std::string& non_localized_name() const { return non_localized_name_; } | 518 const std::string& non_localized_name() const { return non_localized_name_; } |
597 // Base64-encoded version of the key used to sign this extension. | 519 // Base64-encoded version of the key used to sign this extension. |
598 // In pseudocode, returns | 520 // In pseudocode, returns |
599 // base::Base64Encode(RSAPrivateKey(pem_file).ExportPublicKey()). | 521 // base::Base64Encode(RSAPrivateKey(pem_file).ExportPublicKey()). |
600 const std::string& public_key() const { return public_key_; } | 522 const std::string& public_key() const { return public_key_; } |
601 const std::string& description() const { return description_; } | 523 const std::string& description() const { return description_; } |
(...skipping 26 matching lines...) Expand all Loading... |
628 return has_background_page() && !background_page_is_persistent_; | 550 return has_background_page() && !background_page_is_persistent_; |
629 } | 551 } |
630 const PermissionSet* optional_permission_set() const { | 552 const PermissionSet* optional_permission_set() const { |
631 return optional_permission_set_.get(); | 553 return optional_permission_set_.get(); |
632 } | 554 } |
633 const PermissionSet* required_permission_set() const { | 555 const PermissionSet* required_permission_set() const { |
634 return required_permission_set_.get(); | 556 return required_permission_set_.get(); |
635 } | 557 } |
636 // Appends |new_warning[s]| to install_warnings_. | 558 // Appends |new_warning[s]| to install_warnings_. |
637 void AddInstallWarning(const InstallWarning& new_warning); | 559 void AddInstallWarning(const InstallWarning& new_warning); |
638 void AddInstallWarnings(const InstallWarningVector& new_warnings); | 560 void AddInstallWarnings(const std::vector<InstallWarning>& new_warnings); |
639 const InstallWarningVector& install_warnings() const { | 561 const std::vector<InstallWarning>& install_warnings() const { |
640 return install_warnings_; | 562 return install_warnings_; |
641 } | 563 } |
642 const ExtensionIconSet& icons() const { return icons_; } | 564 const ExtensionIconSet& icons() const { return icons_; } |
643 const extensions::Manifest* manifest() const { | 565 const extensions::Manifest* manifest() const { |
644 return manifest_.get(); | 566 return manifest_.get(); |
645 } | 567 } |
646 bool incognito_split_mode() const { return incognito_split_mode_; } | 568 bool incognito_split_mode() const { return incognito_split_mode_; } |
647 bool offline_enabled() const { return offline_enabled_; } | 569 bool offline_enabled() const { return offline_enabled_; } |
648 const OAuth2Info& oauth2_info() const { return oauth2_info_; } | 570 const OAuth2Info& oauth2_info() const { return oauth2_info_; } |
649 bool wants_file_access() const { return wants_file_access_; } | 571 bool wants_file_access() const { return wants_file_access_; } |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 mutable base::Lock runtime_data_lock_; | 840 mutable base::Lock runtime_data_lock_; |
919 mutable RuntimeData runtime_data_; | 841 mutable RuntimeData runtime_data_; |
920 | 842 |
921 // The set of permissions the extension can request at runtime. | 843 // The set of permissions the extension can request at runtime. |
922 scoped_refptr<const PermissionSet> optional_permission_set_; | 844 scoped_refptr<const PermissionSet> optional_permission_set_; |
923 | 845 |
924 // The extension's required / default set of permissions. | 846 // The extension's required / default set of permissions. |
925 scoped_refptr<const PermissionSet> required_permission_set_; | 847 scoped_refptr<const PermissionSet> required_permission_set_; |
926 | 848 |
927 // Any warnings that occurred when trying to create/parse the extension. | 849 // Any warnings that occurred when trying to create/parse the extension. |
928 InstallWarningVector install_warnings_; | 850 std::vector<InstallWarning> install_warnings_; |
929 | 851 |
930 // The icons for the extension. | 852 // The icons for the extension. |
931 ExtensionIconSet icons_; | 853 ExtensionIconSet icons_; |
932 | 854 |
933 // The base extension url for the extension. | 855 // The base extension url for the extension. |
934 GURL extension_url_; | 856 GURL extension_url_; |
935 | 857 |
936 // The extension's version. | 858 // The extension's version. |
937 scoped_ptr<Version> version_; | 859 scoped_ptr<Version> version_; |
938 | 860 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, LoadPageActionHelper); | 986 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, LoadPageActionHelper); |
1065 FRIEND_TEST_ALL_PREFIXES(::TabStripModelTest, Apps); | 987 FRIEND_TEST_ALL_PREFIXES(::TabStripModelTest, Apps); |
1066 | 988 |
1067 DISALLOW_COPY_AND_ASSIGN(Extension); | 989 DISALLOW_COPY_AND_ASSIGN(Extension); |
1068 }; | 990 }; |
1069 | 991 |
1070 typedef std::vector< scoped_refptr<const Extension> > ExtensionList; | 992 typedef std::vector< scoped_refptr<const Extension> > ExtensionList; |
1071 typedef std::set<std::string> ExtensionIdSet; | 993 typedef std::set<std::string> ExtensionIdSet; |
1072 typedef std::vector<std::string> ExtensionIdList; | 994 typedef std::vector<std::string> ExtensionIdList; |
1073 | 995 |
1074 // Let gtest print InstallWarnings. | |
1075 void PrintTo(const Extension::InstallWarning&, ::std::ostream* os); | |
1076 | |
1077 // Handy struct to pass core extension info around. | 996 // Handy struct to pass core extension info around. |
1078 struct ExtensionInfo { | 997 struct ExtensionInfo { |
1079 ExtensionInfo(const base::DictionaryValue* manifest, | 998 ExtensionInfo(const base::DictionaryValue* manifest, |
1080 const std::string& id, | 999 const std::string& id, |
1081 const FilePath& path, | 1000 const FilePath& path, |
1082 Extension::Location location); | 1001 Manifest::Location location); |
1083 ~ExtensionInfo(); | 1002 ~ExtensionInfo(); |
1084 | 1003 |
1085 scoped_ptr<base::DictionaryValue> extension_manifest; | 1004 scoped_ptr<base::DictionaryValue> extension_manifest; |
1086 std::string extension_id; | 1005 std::string extension_id; |
1087 FilePath extension_path; | 1006 FilePath extension_path; |
1088 Extension::Location extension_location; | 1007 Manifest::Location extension_location; |
1089 | 1008 |
1090 private: | 1009 private: |
1091 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); | 1010 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); |
1092 }; | 1011 }; |
1093 | 1012 |
1094 struct UnloadedExtensionInfo { | 1013 struct UnloadedExtensionInfo { |
1095 extension_misc::UnloadedExtensionReason reason; | 1014 extension_misc::UnloadedExtensionReason reason; |
1096 | 1015 |
1097 // Was the extension already disabled? | 1016 // Was the extension already disabled? |
1098 bool already_disabled; | 1017 bool already_disabled; |
(...skipping 25 matching lines...) Expand all Loading... |
1124 | 1043 |
1125 UpdatedExtensionPermissionsInfo( | 1044 UpdatedExtensionPermissionsInfo( |
1126 const Extension* extension, | 1045 const Extension* extension, |
1127 const PermissionSet* permissions, | 1046 const PermissionSet* permissions, |
1128 Reason reason); | 1047 Reason reason); |
1129 }; | 1048 }; |
1130 | 1049 |
1131 } // namespace extensions | 1050 } // namespace extensions |
1132 | 1051 |
1133 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1052 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |