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

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

Issue 7003098: Start refractoring extension permissions into ExtensionPermissionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a bad merge Created 9 years, 6 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_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/memory/linked_ptr.h" 16 #include "base/memory/linked_ptr.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "chrome/common/extensions/extension_constants.h" 19 #include "chrome/common/extensions/extension_constants.h"
20 #include "chrome/common/extensions/extension_icon_set.h" 20 #include "chrome/common/extensions/extension_icon_set.h"
21 #include "chrome/common/extensions/extension_permission_set.h"
21 #include "chrome/common/extensions/user_script.h" 22 #include "chrome/common/extensions/user_script.h"
22 #include "chrome/common/extensions/url_pattern.h" 23 #include "chrome/common/extensions/url_pattern.h"
23 #include "chrome/common/extensions/url_pattern_set.h" 24 #include "chrome/common/extensions/url_pattern_set.h"
24 #include "googleurl/src/gurl.h" 25 #include "googleurl/src/gurl.h"
25 #include "ui/gfx/size.h" 26 #include "ui/gfx/size.h"
26 27
27 class DictionaryValue; 28 class DictionaryValue;
28 class ExtensionAction; 29 class ExtensionAction;
29 class ExtensionResource; 30 class ExtensionResource;
30 class ExtensionSidebarDefaults; 31 class ExtensionSidebarDefaults;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 bool shortcut_ctrl; 135 bool shortcut_ctrl;
135 bool shortcut_shift; 136 bool shortcut_shift;
136 }; 137 };
137 138
138 struct TtsVoice { 139 struct TtsVoice {
139 std::string voice_name; 140 std::string voice_name;
140 std::string locale; 141 std::string locale;
141 std::string gender; 142 std::string gender;
142 }; 143 };
143 144
144 // When prompting the user to install or approve permissions, we display
145 // messages describing the effects of the permissions and not the permissions
146 // themselves. Each PermissionMessage represents one of the messages that is
147 // shown to the user.
148 class PermissionMessage {
149 public:
150 // Do not reorder or add new enumerations in this list. If you need to add a
151 // new enum, add it just prior to ID_ENUM_BOUNDARY and enter its l10n
152 // message in kMessageIds.
153 enum MessageId {
154 ID_UNKNOWN,
155 ID_NONE,
156 ID_BOOKMARKS,
157 ID_GEOLOCATION,
158 ID_BROWSING_HISTORY,
159 ID_TABS,
160 ID_MANAGEMENT,
161 ID_DEBUGGER,
162 ID_HOSTS_1,
163 ID_HOSTS_2,
164 ID_HOSTS_3,
165 ID_HOSTS_4_OR_MORE,
166 ID_HOSTS_ALL,
167 ID_FULL_ACCESS,
168 ID_CLIPBOARD,
169 ID_ENUM_BOUNDARY
170 };
171
172 // Creates a permission message with the given |message_id| and initializes
173 // its message to the appropriate value.
174 static PermissionMessage CreateFromMessageId(MessageId message_id);
175
176 // Creates the corresponding permission message for a list of hosts. This
177 // method exists because the hosts are presented as one message that depends
178 // on what and how many hosts there are.
179 static PermissionMessage CreateFromHostList(
180 const std::vector<std::string> hosts);
181
182 // Gets the id of the permission message, which can be used in UMA
183 // histograms.
184 MessageId message_id() const { return message_id_; }
185
186 // Gets a localized message describing this permission. Please note that
187 // the message will be empty for message types TYPE_NONE and TYPE_UNKNOWN.
188 const string16& message() const { return message_; }
189
190 // Comparator to work with std::set.
191 bool operator<(const PermissionMessage& that) const {
192 return message_id_ < that.message_id_;
193 }
194
195 private:
196 PermissionMessage(MessageId message_id, string16 message_);
197
198 // The index of the id in the array is its enum value. The first two values
199 // are non-existent message ids to act as placeholders for "unknown" and
200 // "none".
201 // Note: Do not change the order of the items in this list since they
202 // are used in a histogram. The order must match the MessageId order.
203 static const int kMessageIds[];
204
205 MessageId message_id_;
206 string16 message_;
207 };
208
209 typedef std::vector<PermissionMessage> PermissionMessages;
210
211 // A permission is defined by its |name| (what is used in the manifest),
212 // and the |message_id| that's used by install/update UI.
213 struct Permission { 145 struct Permission {
214 const char* const name; 146 const char* const name;
215 const PermissionMessage::MessageId message_id; 147 const ExtensionPermissionMessage::MessageId message_id;
216 }; 148 };
217 149
218 enum InitFromValueFlags { 150 enum InitFromValueFlags {
219 NO_FLAGS = 0, 151 NO_FLAGS = 0,
220 152
221 // Usually, the id of an extension is generated by the "key" property of 153 // Usually, the id of an extension is generated by the "key" property of
222 // its manifest, but if |REQUIRE_KEY| is not set, a temporary ID will be 154 // its manifest, but if |REQUIRE_KEY| is not set, a temporary ID will be
223 // generated based on the path. 155 // generated based on the path.
224 REQUIRE_KEY = 1 << 0, 156 REQUIRE_KEY = 1 << 0,
225 157
(...skipping 22 matching lines...) Expand all
248 std::string* error); 180 std::string* error);
249 181
250 // Return the update url used by gallery/webstore extensions. 182 // Return the update url used by gallery/webstore extensions.
251 static GURL GalleryUpdateUrl(bool secure); 183 static GURL GalleryUpdateUrl(bool secure);
252 184
253 // Given two install sources, return the one which should take priority 185 // Given two install sources, return the one which should take priority
254 // over the other. If an extension is installed from two sources A and B, 186 // over the other. If an extension is installed from two sources A and B,
255 // its install source should be set to GetHigherPriorityLocation(A, B). 187 // its install source should be set to GetHigherPriorityLocation(A, B).
256 static Location GetHigherPriorityLocation(Location loc1, Location loc2); 188 static Location GetHigherPriorityLocation(Location loc1, Location loc2);
257 189
258 // Get's the install message id for |permission|. Returns
259 // MessageId::TYPE_NONE if none exists.
260 static PermissionMessage::MessageId GetPermissionMessageId(
261 const std::string& permission);
262
263 // Returns the full list of permission messages that this extension 190 // Returns the full list of permission messages that this extension
264 // should display at install time. 191 // should display at install time.
265 PermissionMessages GetPermissionMessages() const; 192 ExtensionPermissionMessages GetPermissionMessages() const;
266 193
267 // Returns the full list of permission messages that this extension 194 // Returns the full list of permission messages that this extension
268 // should display at install time. The messages are returned as strings 195 // should display at install time. The messages are returned as strings
269 // for convenience. 196 // for convenience.
270 std::vector<string16> GetPermissionMessageStrings() const; 197 std::vector<string16> GetPermissionMessageStrings() const;
271 198
272 // Returns the distinct hosts that should be displayed in the install UI
273 // for the URL patterns |list|. This discards some of the detail that is
274 // present in the manifest to make it as easy as possible to process by
275 // users. In particular we disregard the scheme and path components of
276 // URLPatterns and de-dupe the result, which includes filtering out common
277 // hosts with differing RCDs (aka Registry Controlled Domains, most of which
278 // are Top Level Domains but also include exceptions like co.uk).
279 // NOTE: when de-duping hosts the preferred RCD will be returned, given this
280 // order of preference: .com, .net, .org, first in list.
281 static std::vector<std::string> GetDistinctHostsForDisplay(
282 const URLPatternList& list);
283
284 // Compares two URLPatternLists for security equality by returning whether
285 // the URL patterns in |new_list| contain additional distinct hosts compared
286 // to |old_list|.
287 static bool IsElevatedHostList(
288 const URLPatternList& old_list, const URLPatternList& new_list);
289
290 // Icon sizes used by the extension system. 199 // Icon sizes used by the extension system.
291 static const int kIconSizes[]; 200 static const int kIconSizes[];
292 201
293 // Max size (both dimensions) for browser and page actions. 202 // Max size (both dimensions) for browser and page actions.
294 static const int kPageActionIconMaxSize; 203 static const int kPageActionIconMaxSize;
295 static const int kBrowserActionIconMaxSize; 204 static const int kBrowserActionIconMaxSize;
296 static const int kSidebarIconMaxSize; 205 static const int kSidebarIconMaxSize;
297 206
298 // Each permission is a module that the extension is permitted to use. 207 // Each permission is a module that the extension is permitted to use.
299 // 208 //
300 // NOTE: To add a new permission, define it here, and add an entry to 209 // NOTE: To add a new permission, define it here, and add an entry to
301 // Extension::kPermissions. 210 // Extension::kPermissions.
302 static const char kBackgroundPermission[];
303 static const char kBookmarkPermission[];
304 static const char kClipboardReadPermission[];
305 static const char kClipboardWritePermission[];
306 static const char kContentSettingsPermission[];
307 static const char kContextMenusPermission[];
308 static const char kCookiePermission[];
309 static const char kChromePrivatePermission[];
310 static const char kChromeosInfoPrivatePermission[]; 211 static const char kChromeosInfoPrivatePermission[];
311 static const char kDebuggerPermission[];
312 static const char kExperimentalPermission[];
313 static const char kFileBrowserHandlerPermission[];
314 static const char kFileBrowserPrivatePermission[]; 212 static const char kFileBrowserPrivatePermission[];
315 static const char kGeolocationPermission[];
316 static const char kHistoryPermission[];
317 static const char kIdlePermission[];
318 static const char kManagementPermission[];
319 static const char kMediaPlayerPrivatePermission[]; 213 static const char kMediaPlayerPrivatePermission[];
320 static const char kNotificationPermission[];
321 static const char kProxyPermission[];
322 static const char kTabPermission[];
323 static const char kUnlimitedStoragePermission[];
324 static const char kWebstorePrivatePermission[]; 214 static const char kWebstorePrivatePermission[];
325 static const char kWebSocketProxyPrivatePermission[];
326 215
327 static const Permission kPermissions[];
328 static const size_t kNumPermissions;
329 static const char* const kHostedAppPermissionNames[];
330 static const size_t kNumHostedAppPermissions;
331 static const char* const kComponentPrivatePermissionNames[]; 216 static const char* const kComponentPrivatePermissionNames[];
332 static const size_t kNumComponentPrivatePermissions; 217 static const size_t kNumComponentPrivatePermissions;
333 218
334 // The old name for the unlimited storage permission, which is deprecated but 219 // The old name for the unlimited storage permission, which is deprecated but
335 // still accepted as meaning the same thing as kUnlimitedStoragePermission. 220 // still accepted as meaning the same thing as kUnlimitedStoragePermission.
336 static const char kOldUnlimitedStoragePermission[]; 221 static const char kOldUnlimitedStoragePermission[];
337 222
338 // Valid schemes for web extent URLPatterns. 223 // Valid schemes for web extent URLPatterns.
339 static const int kValidWebExtentSchemes; 224 static const int kValidWebExtentSchemes;
340 225
341 // Valid schemes for host permission URLPatterns. 226 // Valid schemes for host permission URLPatterns.
342 static const int kValidHostPermissionSchemes; 227 static const int kValidHostPermissionSchemes;
343 228
344 // Returns true if the string is one of the known hosted app permissions (see
345 // kHostedAppPermissionNames).
346 static bool IsHostedAppPermission(const std::string& permission);
347
348 // The name of the manifest inside an extension. 229 // The name of the manifest inside an extension.
349 static const FilePath::CharType kManifestFilename[]; 230 static const FilePath::CharType kManifestFilename[];
350 231
351 // The name of locale folder inside an extension. 232 // The name of locale folder inside an extension.
352 static const FilePath::CharType kLocaleFolder[]; 233 static const FilePath::CharType kLocaleFolder[];
353 234
354 // The name of the messages file inside an extension. 235 // The name of the messages file inside an extension.
355 static const FilePath::CharType kMessagesFilename[]; 236 static const FilePath::CharType kMessagesFilename[];
356 237
357 #if defined(OS_WIN) 238 #if defined(OS_WIN)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 // Generates an extension ID from arbitrary input. The same input string will 328 // Generates an extension ID from arbitrary input. The same input string will
448 // always generate the same output ID. 329 // always generate the same output ID.
449 static bool GenerateId(const std::string& input, std::string* output); 330 static bool GenerateId(const std::string& input, std::string* output);
450 331
451 // Expects base64 encoded |input| and formats into |output| including 332 // Expects base64 encoded |input| and formats into |output| including
452 // the appropriate header & footer. 333 // the appropriate header & footer.
453 static bool FormatPEMForFileOutput(const std::string& input, 334 static bool FormatPEMForFileOutput(const std::string& input,
454 std::string* output, 335 std::string* output,
455 bool is_public); 336 bool is_public);
456 337
457 // Determine whether |new_extension| has increased privileges compared to
458 // its previously granted permissions, specified by |granted_apis|,
459 // |granted_extent| and |granted_full_access|.
460 static bool IsPrivilegeIncrease(const bool granted_full_access,
461 const std::set<std::string>& granted_apis,
462 const URLPatternSet& granted_extent,
463 const Extension* new_extension);
464
465 // Given an extension and icon size, read it if present and decode it into 338 // Given an extension and icon size, read it if present and decode it into
466 // result. In the browser process, this will DCHECK if not called on the 339 // result. In the browser process, this will DCHECK if not called on the
467 // file thread. To easily load extension images on the UI thread, see 340 // file thread. To easily load extension images on the UI thread, see
468 // ImageLoadingTracker. 341 // ImageLoadingTracker.
469 static void DecodeIcon(const Extension* extension, 342 static void DecodeIcon(const Extension* extension,
470 Icons icon_size, 343 Icons icon_size,
471 scoped_ptr<SkBitmap>* result); 344 scoped_ptr<SkBitmap>* result);
472 345
473 // Given an icon_path and icon size, read it if present and decode it into 346 // Given an icon_path and icon size, read it if present and decode it into
474 // result. In the browser process, this will DCHECK if not called on the 347 // result. In the browser process, this will DCHECK if not called on the
(...skipping 14 matching lines...) Expand all
489 // --apps-gallery-url switch. The URL returned will not contain a trailing 362 // --apps-gallery-url switch. The URL returned will not contain a trailing
490 // slash. Do not use this as a prefix/extent for the store. Instead see 363 // slash. Do not use this as a prefix/extent for the store. Instead see
491 // ExtensionService::GetWebStoreApp or 364 // ExtensionService::GetWebStoreApp or
492 // ExtensionService::IsDownloadFromGallery 365 // ExtensionService::IsDownloadFromGallery
493 static std::string ChromeStoreLaunchURL(); 366 static std::string ChromeStoreLaunchURL();
494 367
495 // Adds an extension to the scripting whitelist. Used for testing only. 368 // Adds an extension to the scripting whitelist. Used for testing only.
496 static void SetScriptingWhitelist(const ScriptingWhitelist& whitelist); 369 static void SetScriptingWhitelist(const ScriptingWhitelist& whitelist);
497 static const ScriptingWhitelist* GetScriptingWhitelist(); 370 static const ScriptingWhitelist* GetScriptingWhitelist();
498 371
499 // Returns true if the extension has the specified API permission. 372 bool HasApiPermission(const ExtensionAPIPermission& api) const;
500 static bool HasApiPermission(const std::set<std::string>& api_permissions, 373 bool HasApiPermission(const std::string& function_name) const;
501 const std::string& function_name);
502 374
503 // Whether the |effective_host_permissions| and |api_permissions| include 375 const URLPatternSet& GetEffectiveHostPermissions() const;
504 // effective access to all hosts. See the non-static version of the method
505 // for more details.
506 static bool HasEffectiveAccessToAllHosts(
507 const URLPatternSet& effective_host_permissions,
508 const std::set<std::string>& api_permissions);
509
510 bool HasApiPermission(const std::string& function_name) const {
511 return HasApiPermission(this->api_permissions(), function_name);
512 }
513
514 const URLPatternSet& GetEffectiveHostPermissions() const {
515 return effective_host_permissions_;
516 }
517 376
518 // Whether or not the extension is allowed permission for a URL pattern from 377 // Whether or not the extension is allowed permission for a URL pattern from
519 // the manifest. http, https, and chrome://favicon/ is allowed for all 378 // the manifest. http, https, and chrome://favicon/ is allowed for all
520 // extensions, while component extensions are allowed access to 379 // extensions, while component extensions are allowed access to
521 // chrome://resources. 380 // chrome://resources.
522 bool CanSpecifyHostPermission(const URLPattern& pattern) const; 381 bool CanSpecifyHostPermission(const URLPattern& pattern) const;
523 382
524 // Whether the extension has access to the given URL. 383 // Whether the extension has access to the given URL.
525 bool HasHostPermission(const GURL& url) const; 384 bool HasHostPermission(const GURL& url) const;
526 385
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 const std::vector<NaClModuleInfo>& nacl_modules() const { 481 const std::vector<NaClModuleInfo>& nacl_modules() const {
623 return nacl_modules_; 482 return nacl_modules_;
624 } 483 }
625 const std::vector<InputComponentInfo>& input_components() const { 484 const std::vector<InputComponentInfo>& input_components() const {
626 return input_components_; 485 return input_components_;
627 } 486 }
628 const GURL& background_url() const { return background_url_; } 487 const GURL& background_url() const { return background_url_; }
629 const GURL& options_url() const { return options_url_; } 488 const GURL& options_url() const { return options_url_; }
630 const GURL& devtools_url() const { return devtools_url_; } 489 const GURL& devtools_url() const { return devtools_url_; }
631 const std::vector<GURL>& toolstrips() const { return toolstrips_; } 490 const std::vector<GURL>& toolstrips() const { return toolstrips_; }
632 const std::set<std::string>& api_permissions() const { 491 const ExtensionPermissionSet& permission_set() const {
633 return api_permissions_; 492 return *permission_set_;
634 } 493 }
635 const URLPatternList& host_permissions() const { return host_permissions_; } 494 const URLPatternList& host_permissions() const { return host_permissions_; }
636 const GURL& update_url() const { return update_url_; } 495 const GURL& update_url() const { return update_url_; }
637 const ExtensionIconSet& icons() const { return icons_; } 496 const ExtensionIconSet& icons() const { return icons_; }
638 const DictionaryValue* manifest_value() const { 497 const DictionaryValue* manifest_value() const {
639 return manifest_value_.get(); 498 return manifest_value_.get();
640 } 499 }
641 const std::string default_locale() const { return default_locale_; } 500 const std::string default_locale() const { return default_locale_; }
642 const URLOverrideMap& GetChromeURLOverrides() const { 501 const URLOverrideMap& GetChromeURLOverrides() const {
643 return chrome_url_overrides_; 502 return chrome_url_overrides_;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 // Returns true if the extension has more than one "UI surface". For example, 631 // Returns true if the extension has more than one "UI surface". For example,
773 // an extension that has a browser action and a page action. 632 // an extension that has a browser action and a page action.
774 bool HasMultipleUISurfaces() const; 633 bool HasMultipleUISurfaces() const;
775 634
776 // Figures out if a source contains keys not associated with themes - we 635 // Figures out if a source contains keys not associated with themes - we
777 // don't want to allow scripts and such to be bundled with themes. 636 // don't want to allow scripts and such to be bundled with themes.
778 bool ContainsNonThemeKeys(const DictionaryValue& source) const; 637 bool ContainsNonThemeKeys(const DictionaryValue& source) const;
779 638
780 // Only allow the experimental API permission if the command line 639 // Only allow the experimental API permission if the command line
781 // flag is present. 640 // flag is present.
782 bool IsDisallowedExperimentalPermission(const std::string& permission) const; 641 bool IsDisallowedExperimentalPermission(
783 642 ExtensionAPIPermission* permission) const;
784 // Returns true if the string is one of the known api permissions (see
785 // kPermissions).
786 bool IsAPIPermission(const std::string& permission) const;
787 643
788 // Returns true if this is a component, or we are not attempting to access a 644 // Returns true if this is a component, or we are not attempting to access a
789 // component-private permission. 645 // component-private permission.
790 bool IsComponentOnlyPermission(const std::string& permission) const; 646 bool IsComponentOnlyPermission(const std::string& permission) const;
791 647
792 // The set of unique API install messages that the extension has.
793 // NOTE: This only includes messages related to permissions declared in the
794 // "permissions" key in the manifest. Permissions implied from other features
795 // of the manifest, like plugins and content scripts are not included.
796 std::set<PermissionMessage> GetSimplePermissionMessages() const;
797
798 // Cached images for this extension. This should only be touched on the UI 648 // Cached images for this extension. This should only be touched on the UI
799 // thread. 649 // thread.
800 mutable ImageCache image_cache_; 650 mutable ImageCache image_cache_;
801 651
802 // A persistent, globally unique ID. An extension's ID is used in things 652 // A persistent, globally unique ID. An extension's ID is used in things
803 // like directory structures and URLs, and is expected to not change across 653 // like directory structures and URLs, and is expected to not change across
804 // versions. It is generated as a SHA-256 hash of the extension's public 654 // versions. It is generated as a SHA-256 hash of the extension's public
805 // key, or as a hash of the path in the case of unpacked extensions. 655 // key, or as a hash of the path in the case of unpacked extensions.
806 std::string id_; 656 std::string id_;
807 657
808 // The extension's human-readable name. Name is used for display purpose. It 658 // The extension's human-readable name. Name is used for display purpose. It
809 // might be wrapped with unicode bidi control characters so that it is 659 // might be wrapped with unicode bidi control characters so that it is
810 // displayed correctly in RTL context. 660 // displayed correctly in RTL context.
811 // NOTE: Name is UTF-8 and may contain non-ascii characters. 661 // NOTE: Name is UTF-8 and may contain non-ascii characters.
812 std::string name_; 662 std::string name_;
813 663
814 // The absolute path to the directory the extension is stored in. 664 // The absolute path to the directory the extension is stored in.
815 FilePath path_; 665 FilePath path_;
816 666
817 // Default locale for fall back. Can be empty if extension is not localized. 667 // Default locale for fall back. Can be empty if extension is not localized.
818 std::string default_locale_; 668 std::string default_locale_;
819 669
820 // If true, a separate process will be used for the extension in incognito 670 // If true, a separate process will be used for the extension in incognito
821 // mode. 671 // mode.
822 bool incognito_split_mode_; 672 bool incognito_split_mode_;
823 673
824 // Defines the set of URLs in the extension's web content. 674 // Defines the set of URLs in the extension's web content.
825 URLPatternSet extent_; 675 URLPatternSet extent_;
826 676
827 // The set of host permissions that the extension effectively has access to, 677 scoped_ptr<ExtensionPermissionSet> permission_set_;
828 // which is a merge of host_permissions_ and all of the match patterns in
829 // any content scripts the extension has. This is used to determine which
830 // URLs have the ability to load an extension's resources via embedded
831 // chrome-extension: URLs (see extension_protocols.cc).
832 URLPatternSet effective_host_permissions_;
833
834 // The set of module-level APIs this extension can use.
835 std::set<std::string> api_permissions_;
836 678
837 // The icons for the extension. 679 // The icons for the extension.
838 ExtensionIconSet icons_; 680 ExtensionIconSet icons_;
839 681
840 // The base extension url for the extension. 682 // The base extension url for the extension.
841 GURL extension_url_; 683 GURL extension_url_;
842 684
843 // The location the extension was loaded from. 685 // The location the extension was loaded from.
844 Location location_; 686 Location location_;
845 687
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 // Was the extension already disabled? 864 // Was the extension already disabled?
1023 bool already_disabled; 865 bool already_disabled;
1024 866
1025 // The extension being unloaded - this should always be non-NULL. 867 // The extension being unloaded - this should always be non-NULL.
1026 const Extension* extension; 868 const Extension* extension;
1027 869
1028 UnloadedExtensionInfo(const Extension* extension, Reason reason); 870 UnloadedExtensionInfo(const Extension* extension, Reason reason);
1029 }; 871 };
1030 872
1031 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 873 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698