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

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

Issue 10777003: Refactor APIResourceController to ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge/antony/fix build. Created 8 years, 5 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) 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" 21 #include "base/property_bag.h"
22 #include "base/string16.h" 22 #include "base/string16.h"
23 #include "base/time.h" 23 #include "base/time.h"
24 #include "base/tuple.h" 24 #include "base/tuple.h"
25 #include "chrome/browser/extensions/api/api_resource_controller.h"
26 #include "chrome/browser/extensions/app_shortcut_manager.h" 25 #include "chrome/browser/extensions/app_shortcut_manager.h"
27 #include "chrome/browser/extensions/app_sync_bundle.h" 26 #include "chrome/browser/extensions/app_sync_bundle.h"
28 #include "chrome/browser/extensions/apps_promo.h" 27 #include "chrome/browser/extensions/apps_promo.h"
29 #include "chrome/browser/extensions/extension_icon_manager.h" 28 #include "chrome/browser/extensions/extension_icon_manager.h"
30 #include "chrome/browser/extensions/extension_prefs.h" 29 #include "chrome/browser/extensions/extension_prefs.h"
31 #include "chrome/browser/extensions/extension_process_manager.h" 30 #include "chrome/browser/extensions/extension_process_manager.h"
32 #include "chrome/browser/extensions/extension_sync_bundle.h" 31 #include "chrome/browser/extensions/extension_sync_bundle.h"
33 #include "chrome/browser/extensions/extension_toolbar_model.h" 32 #include "chrome/browser/extensions/extension_toolbar_model.h"
34 #include "chrome/browser/extensions/extension_warning_set.h" 33 #include "chrome/browser/extensions/extension_warning_set.h"
35 #include "chrome/browser/extensions/extensions_quota_service.h" 34 #include "chrome/browser/extensions/extensions_quota_service.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 #if defined(UNIT_TEST) 607 #if defined(UNIT_TEST)
609 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) { 608 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) {
610 TrackTerminatedExtension(extension); 609 TrackTerminatedExtension(extension);
611 } 610 }
612 #endif 611 #endif
613 612
614 ExtensionWarningSet* extension_warnings() { 613 ExtensionWarningSet* extension_warnings() {
615 return &extension_warnings_; 614 return &extension_warnings_;
616 } 615 }
617 616
618 // Call only from IO thread.
619 extensions::APIResourceController* api_resource_controller();
620
621 AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; } 617 AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; }
622 618
623 // Specialization of syncer::SyncableService::AsWeakPtr. 619 // Specialization of syncer::SyncableService::AsWeakPtr.
624 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } 620 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); }
625 621
626 private: 622 private:
627 // Contains Extension data that can change during the life of the process, 623 // Contains Extension data that can change during the life of the process,
628 // but does not persist across restarts. 624 // but does not persist across restarts.
629 struct ExtensionRuntimeData { 625 struct ExtensionRuntimeData {
630 // True if the background page is ready. 626 // True if the background page is ready.
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 bool update_once_all_providers_are_ready_; 835 bool update_once_all_providers_are_ready_;
840 836
841 NaClModuleInfoList nacl_module_list_; 837 NaClModuleInfoList nacl_module_list_;
842 838
843 extensions::AppSyncBundle app_sync_bundle_; 839 extensions::AppSyncBundle app_sync_bundle_;
844 extensions::ExtensionSyncBundle extension_sync_bundle_; 840 extensions::ExtensionSyncBundle extension_sync_bundle_;
845 841
846 // Contains an entry for each warning that shall be currently shown. 842 // Contains an entry for each warning that shall be currently shown.
847 ExtensionWarningSet extension_warnings_; 843 ExtensionWarningSet extension_warnings_;
848 844
849 scoped_ptr<extensions::APIResourceController> api_resource_controller_;
850
851 extensions::ProcessMap process_map_; 845 extensions::ProcessMap process_map_;
852 846
853 AppShortcutManager app_shortcut_manager_; 847 AppShortcutManager app_shortcut_manager_;
854 848
855 scoped_ptr<ExtensionErrorUI> extension_error_ui_; 849 scoped_ptr<ExtensionErrorUI> extension_error_ui_;
856 850
857 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 851 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
858 InstallAppsWithUnlimtedStorage); 852 InstallAppsWithUnlimtedStorage);
859 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 853 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
860 InstallAppsAndCheckStorageProtection); 854 InstallAppsAndCheckStorageProtection);
861 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 855 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
862 }; 856 };
863 857
864 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 858 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/usb/usb_device_resource.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698