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

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 10824342: Attached data cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « base/supports_user_data.h ('k') | chrome/browser/extensions/extension_service.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) 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_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
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/command_line.h" 14 #include "base/command_line.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
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/memory/linked_ptr.h" 18 #include "base/memory/linked_ptr.h"
19 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
21 #include "base/property_bag.h"
22 #include "base/string16.h" 21 #include "base/string16.h"
23 #include "base/time.h" 22 #include "base/time.h"
24 #include "base/tuple.h" 23 #include "base/tuple.h"
25 #include "chrome/browser/extensions/app_shortcut_manager.h" 24 #include "chrome/browser/extensions/app_shortcut_manager.h"
26 #include "chrome/browser/extensions/app_sync_bundle.h" 25 #include "chrome/browser/extensions/app_sync_bundle.h"
27 #include "chrome/browser/extensions/extension_icon_manager.h" 26 #include "chrome/browser/extensions/extension_icon_manager.h"
28 #include "chrome/browser/extensions/extension_prefs.h" 27 #include "chrome/browser/extensions/extension_prefs.h"
29 #include "chrome/browser/extensions/extension_process_manager.h" 28 #include "chrome/browser/extensions/extension_process_manager.h"
30 #include "chrome/browser/extensions/extension_sync_bundle.h" 29 #include "chrome/browser/extensions/extension_sync_bundle.h"
31 #include "chrome/browser/extensions/extension_toolbar_model.h" 30 #include "chrome/browser/extensions/extension_toolbar_model.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // being upgraded. 266 // being upgraded.
268 bool IsBeingUpgraded(const extensions::Extension* extension); 267 bool IsBeingUpgraded(const extensions::Extension* extension);
269 void SetBeingUpgraded(const extensions::Extension* extension, bool value); 268 void SetBeingUpgraded(const extensions::Extension* extension, bool value);
270 269
271 // Getter and setter for the flag that specifies if the extension has used 270 // Getter and setter for the flag that specifies if the extension has used
272 // the webrequest API. 271 // the webrequest API.
273 // TODO(mpcomplete): remove. http://crbug.com/100411 272 // TODO(mpcomplete): remove. http://crbug.com/100411
274 bool HasUsedWebRequest(const extensions::Extension* extension); 273 bool HasUsedWebRequest(const extensions::Extension* extension);
275 void SetHasUsedWebRequest(const extensions::Extension* extension, bool value); 274 void SetHasUsedWebRequest(const extensions::Extension* extension, bool value);
276 275
277 // Getter for the extension's runtime data PropertyBag.
278 base::PropertyBag* GetPropertyBag(const extensions::Extension* extension);
279
280 // Initialize and start all installed extensions. 276 // Initialize and start all installed extensions.
281 void Init(); 277 void Init();
282 278
283 // To delay some initialization until after import has finished, register 279 // To delay some initialization until after import has finished, register
284 // for the notification. 280 // for the notification.
285 // TODO(yoz): remove InitEventRoutersAterImport. 281 // TODO(yoz): remove InitEventRoutersAterImport.
286 void InitEventRoutersAfterImport(); 282 void InitEventRoutersAfterImport();
287 void RegisterForImportFinished(); 283 void RegisterForImportFinished();
288 284
289 // Complete some initialization after being notified that import has finished. 285 // Complete some initialization after being notified that import has finished.
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 struct ExtensionRuntimeData { 628 struct ExtensionRuntimeData {
633 // True if the background page is ready. 629 // True if the background page is ready.
634 bool background_page_ready; 630 bool background_page_ready;
635 631
636 // True while the extension is being upgraded. 632 // True while the extension is being upgraded.
637 bool being_upgraded; 633 bool being_upgraded;
638 634
639 // True if the extension has used the webRequest API. 635 // True if the extension has used the webRequest API.
640 bool has_used_webrequest; 636 bool has_used_webrequest;
641 637
642 // Generic bag of runtime data that users can associate with extensions.
643 base::PropertyBag property_bag;
644
645 ExtensionRuntimeData(); 638 ExtensionRuntimeData();
646 ~ExtensionRuntimeData(); 639 ~ExtensionRuntimeData();
647 }; 640 };
648 typedef std::map<std::string, ExtensionRuntimeData> ExtensionRuntimeDataMap; 641 typedef std::map<std::string, ExtensionRuntimeData> ExtensionRuntimeDataMap;
649 642
650 struct NaClModuleInfo { 643 struct NaClModuleInfo {
651 NaClModuleInfo(); 644 NaClModuleInfo();
652 ~NaClModuleInfo(); 645 ~NaClModuleInfo();
653 646
654 GURL url; 647 GURL url;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 #endif 861 #endif
869 862
870 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 863 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
871 InstallAppsWithUnlimtedStorage); 864 InstallAppsWithUnlimtedStorage);
872 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 865 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
873 InstallAppsAndCheckStorageProtection); 866 InstallAppsAndCheckStorageProtection);
874 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 867 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
875 }; 868 };
876 869
877 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 870 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « base/supports_user_data.h ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698