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

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

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the previous fix 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/sync/glue/non_frontend_data_type_controller.h
diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller.h b/chrome/browser/sync/glue/non_frontend_data_type_controller.h
index c2f2ee07be85033e0f7bf880b4f097ade8a28325..f6fe8cda031ca3048591e431b06315f436697c94 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller.h
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.h
@@ -20,6 +20,7 @@ class ProfileSyncFactory;
namespace base { class TimeDelta; }
namespace browser_sync {
+class NewAssociatorInterface;
class AssociatorInterface;
class ChangeProcessor;
@@ -55,6 +56,11 @@ class NonFrontendDataTypeController : public DataTypeController {
// Note: this is performed on the datatype's thread.
virtual void OnUnrecoverableError(const tracked_objects::Location& from_here,
const std::string& message);
+
+ // TODO(zea): ensure this plays nicely with threads once non-UI datatypes
+ // use the new associator interface.
+ virtual NewAssociatorInterface* model_associator() const;
+ virtual void set_model_associator(AssociatorInterface* associator);
protected:
// For testing only.
NonFrontendDataTypeController();
@@ -134,7 +140,6 @@ class NonFrontendDataTypeController : public DataTypeController {
Profile* profile() const;
ProfileSyncService* profile_sync_service() const;
void set_state(State state);
- void set_model_associator(AssociatorInterface* associator);
void set_change_processor(ChangeProcessor* change_processor);
private:
@@ -145,6 +150,8 @@ class NonFrontendDataTypeController : public DataTypeController {
State state_;
scoped_ptr<StartCallback> start_callback_;
+ // TODO(zea): make |model_associator_| RefCountedThreadSafe and remove
+ // |change_processor_| once we're using the new associator interface.
scoped_ptr<AssociatorInterface> model_associator_;
scoped_ptr<ChangeProcessor> change_processor_;

Powered by Google App Engine
This is Rietveld 408576698