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

Side by Side Diff: chrome/browser/sync/glue/theme_model_associator.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 unified diff | Download patch | Annotate | Revision Log
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_SYNC_GLUE_THEME_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_THEME_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_THEME_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_THEME_MODEL_ASSOCIATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/sync/glue/model_associator.h" 10 #include "chrome/browser/sync/glue/model_associator.h"
11 #include "chrome/browser/sync/syncable/model_type.h" 11 #include "chrome/browser/sync/syncable/model_type.h"
12 12
13 class ProfileSyncService; 13 class ProfileSyncService;
14 14
15 namespace browser_sync { 15 namespace browser_sync {
16 16
17 class UnrecoverableErrorHandler; 17 class UnrecoverableErrorHandler;
18 18
19 // Contains all logic for associating the Chrome themes model and the 19 // Contains all logic for associating the Chrome themes model and the
20 // sync themes model. 20 // sync themes model.
21 class ThemeModelAssociator : public AssociatorInterface { 21 class ThemeModelAssociator
22 : public NewAssociatorInterface {
22 public: 23 public:
23 explicit ThemeModelAssociator(ProfileSyncService* sync_service); 24 explicit ThemeModelAssociator(ProfileSyncService* sync_service);
24 virtual ~ThemeModelAssociator();
25
26 // Used by profile_sync_test_util.h.
27 static syncable::ModelType model_type() { return syncable::THEMES; }
28 25
29 // AssociatorInterface implementation. 26 // AssociatorInterface implementation.
30 virtual bool AssociateModels(); 27 virtual bool AssociateModels();
31 virtual bool DisassociateModels(); 28 virtual bool DisassociateModels();
32 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); 29 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes);
33 virtual void AbortAssociation() { 30 virtual void AbortAssociation() {
34 // No implementation needed, this associator runs on the main 31 // No implementation needed, this associator runs on the main
35 // thread. 32 // thread.
36 } 33 }
37 virtual bool CryptoReadyIfNecessary(); 34 virtual bool CryptoReadyIfNecessary();
38 35
36 protected:
37 virtual ~ThemeModelAssociator();
38
39 private: 39 private:
40 ProfileSyncService* sync_service_; 40 ProfileSyncService* sync_service_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(ThemeModelAssociator); 42 DISALLOW_COPY_AND_ASSIGN(ThemeModelAssociator);
43 }; 43 };
44 44
45 } // namespace browser_sync 45 } // namespace browser_sync
46 46
47 #endif // CHROME_BROWSER_SYNC_GLUE_THEME_MODEL_ASSOCIATOR_H_ 47 #endif // CHROME_BROWSER_SYNC_GLUE_THEME_MODEL_ASSOCIATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698