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

Unified Diff: chrome/browser/sync/glue/extension_model_associator.h

Issue 3110008: Massive refactoring of extensions sync code (Closed) Base URL: 76.121.192.83:~/projects/chromium/src
Patch Set: Fixed compile error Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/extension_model_associator.h
diff --git a/chrome/browser/sync/glue/extension_model_associator.h b/chrome/browser/sync/glue/extension_model_associator.h
index 86102d295620b45aecafa53f1970e5623f310ea0..134ccb54bb0d59ce6717829eae8a3190078d56bb 100644
--- a/chrome/browser/sync/glue/extension_model_associator.h
+++ b/chrome/browser/sync/glue/extension_model_associator.h
@@ -6,27 +6,12 @@
#define CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_ASSOCIATOR_H_
#pragma once
-#include <string>
-
#include "base/basictypes.h"
-#include "chrome/browser/sync/glue/extension_data.h"
#include "chrome/browser/sync/glue/model_associator.h"
#include "chrome/browser/sync/syncable/model_type.h"
-#include "chrome/common/extensions/extension.h"
-class ExtensionsService;
-class Profile;
class ProfileSyncService;
-namespace sync_api {
-class ReadNode;
-class WriteTransaction;
-} // namespace sync_api
-
-namespace sync_pb {
-class ExtensionSpecifics;
-} // namespace sync_pb
-
namespace browser_sync {
// Contains all logic for associating the Chrome extensions model and
@@ -49,53 +34,8 @@ class ExtensionModelAssociator : public AssociatorInterface {
// thread.
}
- // Used by ExtensionChangeProcessor.
- //
- // TODO(akalin): These functions can actually be moved to the
- // ChangeProcessor after some refactoring.
-
- // TODO(akalin): Return an error string instead of just a bool.
- bool OnClientUpdate(const std::string& id);
- void OnServerUpdate(const sync_pb::ExtensionSpecifics& server_data);
- void OnServerRemove(const std::string& id);
-
private:
- // Returns the extension service from |sync_service_|. Never
- // returns NULL.
- ExtensionsService* GetExtensionsService();
-
- bool GetExtensionDataFromServer(
- const std::string& id, sync_api::WriteTransaction* trans,
- const sync_api::ReadNode& root,
- sync_pb::ExtensionSpecifics* server_data);
-
- // Updates the server data from the given extension data.
- // extension_data->ServerNeedsUpdate() must hold before this
- // function is called. Returns whether or not the update was
- // successful. If the update was successful,
- // extension_data->ServerNeedsUpdate() will be false after this
- // function is called. This function leaves
- // extension_data->ClientNeedsUpdate() unchanged.
- bool UpdateServer(ExtensionData* extension_data,
- sync_api::WriteTransaction* trans,
- const sync_api::ReadNode& root);
-
- // Tries to update the client data from the given extension data.
- // extension_data->ServerNeedsUpdate() must not hold and
- // extension_data->ClientNeedsUpdate() must hold before this
- // function is called. If the update was successful,
- // extension_data->ClientNeedsUpdate() will be false after this
- // function is called. Otherwise, the extension needs updating to a
- // new version.
- void TryUpdateClient(ExtensionData* extension_data);
-
- // Kick off a run of the extension updater.
- //
- // TODO(akalin): Combine this with the similar function in
- // theme_util.cc.
- void NudgeExtensionUpdater();
-
- // Weak pointer.
+ // Weak pointer. Always non-NULL.
ProfileSyncService* sync_service_;
DISALLOW_COPY_AND_ASSIGN(ExtensionModelAssociator);
« no previous file with comments | « chrome/browser/sync/glue/extension_change_processor.cc ('k') | chrome/browser/sync/glue/extension_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698