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

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

Issue 7977018: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix race condition in ExtensionSettingsUIWrapper::Core Created 9 years, 3 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 | « no previous file | 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) 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_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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 10 matching lines...) Expand all
21 #include "base/task.h" 21 #include "base/task.h"
22 #include "base/time.h" 22 #include "base/time.h"
23 #include "base/tuple.h" 23 #include "base/tuple.h"
24 #include "chrome/browser/extensions/apps_promo.h" 24 #include "chrome/browser/extensions/apps_promo.h"
25 #include "chrome/browser/extensions/extension_app_api.h" 25 #include "chrome/browser/extensions/extension_app_api.h"
26 #include "chrome/browser/extensions/extension_icon_manager.h" 26 #include "chrome/browser/extensions/extension_icon_manager.h"
27 #include "chrome/browser/extensions/extension_menu_manager.h" 27 #include "chrome/browser/extensions/extension_menu_manager.h"
28 #include "chrome/browser/extensions/extension_prefs.h" 28 #include "chrome/browser/extensions/extension_prefs.h"
29 #include "chrome/browser/extensions/extension_permissions_api.h" 29 #include "chrome/browser/extensions/extension_permissions_api.h"
30 #include "chrome/browser/extensions/extension_process_manager.h" 30 #include "chrome/browser/extensions/extension_process_manager.h"
31 #include "chrome/browser/extensions/extension_settings_ui_wrapper.h"
31 #include "chrome/browser/extensions/extension_sync_data.h" 32 #include "chrome/browser/extensions/extension_sync_data.h"
32 #include "chrome/browser/extensions/extension_toolbar_model.h" 33 #include "chrome/browser/extensions/extension_toolbar_model.h"
33 #include "chrome/browser/extensions/extensions_quota_service.h" 34 #include "chrome/browser/extensions/extensions_quota_service.h"
34 #include "chrome/browser/extensions/external_extension_provider_interface.h" 35 #include "chrome/browser/extensions/external_extension_provider_interface.h"
35 #include "chrome/browser/extensions/pending_extension_manager.h" 36 #include "chrome/browser/extensions/pending_extension_manager.h"
36 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" 37 #include "chrome/browser/extensions/sandboxed_extension_unpacker.h"
37 #include "chrome/browser/prefs/pref_change_registrar.h" 38 #include "chrome/browser/prefs/pref_change_registrar.h"
38 #include "chrome/browser/sync/api/sync_change.h" 39 #include "chrome/browser/sync/api/sync_change.h"
39 #include "chrome/browser/sync/api/syncable_service.h" 40 #include "chrome/browser/sync/api/syncable_service.h"
40 #include "chrome/common/extensions/extension.h" 41 #include "chrome/common/extensions/extension.h"
41 #include "chrome/common/extensions/extension_constants.h" 42 #include "chrome/common/extensions/extension_constants.h"
42 #include "content/browser/browser_thread.h" 43 #include "content/browser/browser_thread.h"
43 #include "content/common/notification_observer.h" 44 #include "content/common/notification_observer.h"
44 #include "content/common/notification_registrar.h" 45 #include "content/common/notification_registrar.h"
45 #include "content/common/property_bag.h" 46 #include "content/common/property_bag.h"
46 47
47 class CrxInstaller; 48 class CrxInstaller;
48 class ExtensionBookmarkEventRouter; 49 class ExtensionBookmarkEventRouter;
49 class ExtensionBrowserEventRouter; 50 class ExtensionBrowserEventRouter;
50 class ExtensionContentSettingsStore; 51 class ExtensionContentSettingsStore;
51 class ExtensionCookiesEventRouter; 52 class ExtensionCookiesEventRouter;
52 class ExtensionDownloadsEventRouter; 53 class ExtensionDownloadsEventRouter;
53 class ExtensionFileBrowserEventRouter; 54 class ExtensionFileBrowserEventRouter;
54 class ExtensionHistoryEventRouter; 55 class ExtensionHistoryEventRouter;
55 class ExtensionInstallUI; 56 class ExtensionInstallUI;
56 class ExtensionManagementEventRouter; 57 class ExtensionManagementEventRouter;
57 class ExtensionPreferenceEventRouter; 58 class ExtensionPreferenceEventRouter;
58 class ExtensionServiceBackend; 59 class ExtensionServiceBackend;
59 class ExtensionSettings;
60 class ExtensionSyncData; 60 class ExtensionSyncData;
61 class ExtensionToolbarModel; 61 class ExtensionToolbarModel;
62 class ExtensionUpdater; 62 class ExtensionUpdater;
63 class ExtensionWebNavigationEventRouter; 63 class ExtensionWebNavigationEventRouter;
64 class GURL; 64 class GURL;
65 class PendingExtensionManager; 65 class PendingExtensionManager;
66 class Profile; 66 class Profile;
67 class SyncData; 67 class SyncData;
68 class Version; 68 class Version;
69 69
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // true iff the target extension exists. 172 // true iff the target extension exists.
173 static bool UninstallExtensionHelper(ExtensionService* extensions_service, 173 static bool UninstallExtensionHelper(ExtensionService* extensions_service,
174 const std::string& extension_id); 174 const std::string& extension_id);
175 175
176 // Constructor stores pointers to |profile| and |extension_prefs| but 176 // Constructor stores pointers to |profile| and |extension_prefs| but
177 // ownership remains at caller. 177 // ownership remains at caller.
178 ExtensionService(Profile* profile, 178 ExtensionService(Profile* profile,
179 const CommandLine* command_line, 179 const CommandLine* command_line,
180 const FilePath& install_directory, 180 const FilePath& install_directory,
181 ExtensionPrefs* extension_prefs, 181 ExtensionPrefs* extension_prefs,
182 ExtensionSettings* extension_settings,
183 bool autoupdate_enabled, 182 bool autoupdate_enabled,
184 bool extensions_enabled); 183 bool extensions_enabled);
185 184
186 virtual ~ExtensionService(); 185 virtual ~ExtensionService();
187 186
188 // Gets the list of currently installed extensions. 187 // Gets the list of currently installed extensions.
189 virtual const ExtensionList* extensions() const OVERRIDE; 188 virtual const ExtensionList* extensions() const OVERRIDE;
190 const ExtensionList* disabled_extensions() const; 189 const ExtensionList* disabled_extensions() const;
191 const ExtensionList* terminated_extensions() const; 190 const ExtensionList* terminated_extensions() const;
192 191
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 bool show_extensions_prompts() { 432 bool show_extensions_prompts() {
434 return show_extensions_prompts_; 433 return show_extensions_prompts_;
435 } 434 }
436 435
437 Profile* profile(); 436 Profile* profile();
438 437
439 // TODO(skerner): Change to const ExtensionPrefs& extension_prefs() const, 438 // TODO(skerner): Change to const ExtensionPrefs& extension_prefs() const,
440 // ExtensionPrefs* mutable_extension_prefs(). 439 // ExtensionPrefs* mutable_extension_prefs().
441 ExtensionPrefs* extension_prefs(); 440 ExtensionPrefs* extension_prefs();
442 441
443 ExtensionSettings* extension_settings(); 442 ExtensionSettingsUIWrapper* extension_settings();
444 443
445 ExtensionContentSettingsStore* GetExtensionContentSettingsStore(); 444 ExtensionContentSettingsStore* GetExtensionContentSettingsStore();
446 445
447 // Whether the extension service is ready. 446 // Whether the extension service is ready.
448 // TODO(skerner): Get rid of this method. crbug.com/63756 447 // TODO(skerner): Get rid of this method. crbug.com/63756
449 bool is_ready() { return ready_; } 448 bool is_ready() { return ready_; }
450 449
451 // Note that this may return NULL if autoupdate is not turned on. 450 // Note that this may return NULL if autoupdate is not turned on.
452 ExtensionUpdater* updater(); 451 ExtensionUpdater* updater();
453 452
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 base::WeakPtrFactory<ExtensionService> weak_ptr_factory_; 661 base::WeakPtrFactory<ExtensionService> weak_ptr_factory_;
663 662
664 ScopedRunnableMethodFactory<ExtensionService> method_factory_; 663 ScopedRunnableMethodFactory<ExtensionService> method_factory_;
665 664
666 // The profile this ExtensionService is part of. 665 // The profile this ExtensionService is part of.
667 Profile* profile_; 666 Profile* profile_;
668 667
669 // Preferences for the owning profile (weak reference). 668 // Preferences for the owning profile (weak reference).
670 ExtensionPrefs* extension_prefs_; 669 ExtensionPrefs* extension_prefs_;
671 670
672 // Settings for the owning profile (weak reference). 671 // Settings for the owning profile.
673 ExtensionSettings* extension_settings_; 672 ExtensionSettingsUIWrapper extension_settings_;
674 673
675 // The current list of installed extensions. 674 // The current list of installed extensions.
676 // TODO(aa): This should use chrome/common/extensions/extension_set.h. 675 // TODO(aa): This should use chrome/common/extensions/extension_set.h.
677 ExtensionList extensions_; 676 ExtensionList extensions_;
678 677
679 // The list of installed extensions that have been disabled. 678 // The list of installed extensions that have been disabled.
680 ExtensionList disabled_extensions_; 679 ExtensionList disabled_extensions_;
681 680
682 // The list of installed extensions that have been terminated. 681 // The list of installed extensions that have been terminated.
683 ExtensionList terminated_extensions_; 682 ExtensionList terminated_extensions_;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 SyncBundle extension_sync_bundle_; 799 SyncBundle extension_sync_bundle_;
801 800
802 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 801 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
803 InstallAppsWithUnlimtedStorage); 802 InstallAppsWithUnlimtedStorage);
804 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 803 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
805 InstallAppsAndCheckStorageProtection); 804 InstallAppsAndCheckStorageProtection);
806 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 805 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
807 }; 806 };
808 807
809 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 808 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698