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

Unified Diff: chrome/browser/extensions/extension_service.h

Issue 6852029: [Sync] Move some extension-sync-related logic to ExtensionService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address asargent's comments Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 3c5b6579aa333e2c0d4878646951ff450263d368..c63ec78647ee1513d078e28d5d6dec0b32daf765 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -19,6 +19,7 @@
#include "base/task.h"
#include "base/time.h"
#include "base/tuple.h"
+#include "base/version.h"
#include "chrome/browser/extensions/apps_promo.h"
#include "chrome/browser/extensions/extension_icon_manager.h"
#include "chrome/browser/extensions/extension_menu_manager.h"
@@ -39,6 +40,7 @@
class ExtensionBrowserEventRouter;
class ExtensionPreferenceEventRouter;
class ExtensionServiceBackend;
+struct ExtensionSyncData;
class ExtensionToolbarModel;
class ExtensionUpdater;
class GURL;
@@ -80,9 +82,29 @@ class ExtensionServiceInterface {
// Safe to call multiple times in a row.
//
- // TODO(akalin): Remove this method (and others) once we add
- // ProcessSyncData().
+ // TODO(akalin): Remove this method (and others) once we refactor
+ // themes sync to not use it directly.
virtual void CheckForUpdatesSoon() = 0;
+
+ // Take any actions required to make the local state of the
+ // extension match the state in |extension_sync_data| (including
+ // installing/uninstalling the extension).
+ //
+ // TODO(akalin): We'll eventually need a separate method for app
+ // sync. See http://crbug.com/58077 and http://crbug.com/61447.
+ virtual void ProcessSyncData(
+ const ExtensionSyncData& extension_sync_data,
+ PendingExtensionInfo::ShouldAllowInstallPredicate should_allow) = 0;
+
+ // TODO(akalin): Add a method like:
+ //
+ // virtual void
+ // GetInitialSyncData(bool (*filter)(Extension),
+ // map<string, ExtensionSyncData>* out) const;
+ //
+ // which would fill |out| with sync data for the extensions that
+ // match |filter|. Sync would use this for the initial syncing
+ // step.
};
// Manages installed and running Chromium extensions.
@@ -342,6 +364,11 @@ class ExtensionService
virtual void CheckForUpdatesSoon();
+ virtual void ProcessSyncData(
+ const ExtensionSyncData& extension_sync_data,
+ PendingExtensionInfo::ShouldAllowInstallPredicate
+ should_allow_install);
+
void set_extensions_enabled(bool enabled) { extensions_enabled_ = enabled; }
bool extensions_enabled() { return extensions_enabled_; }
« no previous file with comments | « chrome/browser/background_application_list_model_unittest.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698