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

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

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 class GURL; 65 class GURL;
66 class PendingExtensionManager; 66 class PendingExtensionManager;
67 class Profile; 67 class Profile;
68 class Version; 68 class Version;
69 69
70 namespace chromeos { 70 namespace chromeos {
71 class ExtensionBluetoothEventRouter; 71 class ExtensionBluetoothEventRouter;
72 class ExtensionInputMethodEventRouter; 72 class ExtensionInputMethodEventRouter;
73 } 73 }
74 74
75 namespace csync { 75 namespace syncer {
76 class SyncData; 76 class SyncData;
77 class SyncErrorFactory; 77 class SyncErrorFactory;
78 } 78 }
79 79
80 namespace extensions { 80 namespace extensions {
81 class AppSyncData; 81 class AppSyncData;
82 class ComponentLoader; 82 class ComponentLoader;
83 class ContentSettingsStore; 83 class ContentSettingsStore;
84 class Extension; 84 class Extension;
85 class ExtensionCookiesEventRouter; 85 class ExtensionCookiesEventRouter;
86 class ExtensionSyncData; 86 class ExtensionSyncData;
87 class ExtensionUpdater; 87 class ExtensionUpdater;
88 class SettingsFrontend; 88 class SettingsFrontend;
89 class WebNavigationEventRouter; 89 class WebNavigationEventRouter;
90 } 90 }
91 91
92 // This is an interface class to encapsulate the dependencies that 92 // This is an interface class to encapsulate the dependencies that
93 // various classes have on ExtensionService. This allows easy mocking. 93 // various classes have on ExtensionService. This allows easy mocking.
94 class ExtensionServiceInterface : public csync::SyncableService { 94 class ExtensionServiceInterface : public syncer::SyncableService {
95 public: 95 public:
96 // A function that returns true if the given extension should be 96 // A function that returns true if the given extension should be
97 // included and false if it should be filtered out. Identical to 97 // included and false if it should be filtered out. Identical to
98 // PendingExtensionInfo::ShouldAllowInstallPredicate. 98 // PendingExtensionInfo::ShouldAllowInstallPredicate.
99 typedef bool (*ExtensionFilter)(const extensions::Extension&); 99 typedef bool (*ExtensionFilter)(const extensions::Extension&);
100 100
101 virtual ~ExtensionServiceInterface() {} 101 virtual ~ExtensionServiceInterface() {}
102 virtual const ExtensionSet* extensions() const = 0; 102 virtual const ExtensionSet* extensions() const = 0;
103 virtual const ExtensionSet* disabled_extensions() const = 0; 103 virtual const ExtensionSet* disabled_extensions() const = 0;
104 virtual PendingExtensionManager* pending_extension_manager() = 0; 104 virtual PendingExtensionManager* pending_extension_manager() = 0;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 virtual void UpdateExtensionBlacklist( 413 virtual void UpdateExtensionBlacklist(
414 const std::vector<std::string>& blacklist) OVERRIDE; 414 const std::vector<std::string>& blacklist) OVERRIDE;
415 415
416 // Go through each extension and unload those that the network admin has 416 // Go through each extension and unload those that the network admin has
417 // put on the blacklist (not to be confused with the Google-managed blacklist) 417 // put on the blacklist (not to be confused with the Google-managed blacklist)
418 // set of extensions. 418 // set of extensions.
419 virtual void CheckAdminBlacklist() OVERRIDE; 419 virtual void CheckAdminBlacklist() OVERRIDE;
420 420
421 virtual void CheckForUpdatesSoon() OVERRIDE; 421 virtual void CheckForUpdatesSoon() OVERRIDE;
422 422
423 // csync::SyncableService implementation. 423 // syncer::SyncableService implementation.
424 virtual csync::SyncError MergeDataAndStartSyncing( 424 virtual syncer::SyncError MergeDataAndStartSyncing(
425 syncable::ModelType type, 425 syncable::ModelType type,
426 const csync::SyncDataList& initial_sync_data, 426 const syncer::SyncDataList& initial_sync_data,
427 scoped_ptr<csync::SyncChangeProcessor> sync_processor, 427 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
428 scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE; 428 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
429 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; 429 virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
430 virtual csync::SyncDataList GetAllSyncData( 430 virtual syncer::SyncDataList GetAllSyncData(
431 syncable::ModelType type) const OVERRIDE; 431 syncable::ModelType type) const OVERRIDE;
432 virtual csync::SyncError ProcessSyncChanges( 432 virtual syncer::SyncError ProcessSyncChanges(
433 const tracked_objects::Location& from_here, 433 const tracked_objects::Location& from_here,
434 const csync::SyncChangeList& change_list) OVERRIDE; 434 const syncer::SyncChangeList& change_list) OVERRIDE;
435 435
436 // Gets the sync data for the given extension, assuming that the extension is 436 // Gets the sync data for the given extension, assuming that the extension is
437 // syncable. 437 // syncable.
438 extensions::ExtensionSyncData GetExtensionSyncData( 438 extensions::ExtensionSyncData GetExtensionSyncData(
439 const extensions::Extension& extension) const; 439 const extensions::Extension& extension) const;
440 440
441 // Gets the sync data for the given app, assuming that the app is 441 // Gets the sync data for the given app, assuming that the app is
442 // syncable. 442 // syncable.
443 extensions::AppSyncData GetAppSyncData( 443 extensions::AppSyncData GetAppSyncData(
444 const extensions::Extension& extension) const; 444 const extensions::Extension& extension) const;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 611
612 ExtensionWarningSet* extension_warnings() { 612 ExtensionWarningSet* extension_warnings() {
613 return &extension_warnings_; 613 return &extension_warnings_;
614 } 614 }
615 615
616 // Call only from IO thread. 616 // Call only from IO thread.
617 extensions::APIResourceController* api_resource_controller(); 617 extensions::APIResourceController* api_resource_controller();
618 618
619 AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; } 619 AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; }
620 620
621 // Specialization of csync::SyncableService::AsWeakPtr. 621 // Specialization of syncer::SyncableService::AsWeakPtr.
622 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } 622 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); }
623 623
624 private: 624 private:
625 // Contains Extension data that can change during the life of the process, 625 // Contains Extension data that can change during the life of the process,
626 // but does not persist across restarts. 626 // but does not persist across restarts.
627 struct ExtensionRuntimeData { 627 struct ExtensionRuntimeData {
628 // True if the background page is ready. 628 // True if the background page is ready.
629 bool background_page_ready; 629 bool background_page_ready;
630 630
631 // True while the extension is being upgraded. 631 // True while the extension is being upgraded.
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 scoped_ptr<ExtensionGlobalError> extension_global_error_; 852 scoped_ptr<ExtensionGlobalError> extension_global_error_;
853 853
854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
855 InstallAppsWithUnlimtedStorage); 855 InstallAppsWithUnlimtedStorage);
856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
857 InstallAppsAndCheckStorageProtection); 857 InstallAppsAndCheckStorageProtection);
858 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 858 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
859 }; 859 };
860 860
861 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 861 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_sync_data_unittest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698