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

Side by Side Diff: chrome/browser/sync/glue/theme_model_associator.h

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add operator= Created 9 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) 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 : public AssociatorInterface {
22 public: 22 public:
23 explicit ThemeModelAssociator(ProfileSyncService* sync_service); 23 explicit ThemeModelAssociator(ProfileSyncService* sync_service);
24 virtual ~ThemeModelAssociator(); 24 virtual ~ThemeModelAssociator();
25 25
26 // Used by profile_sync_test_util.h. 26 // Used by profile_sync_test_util.h.
27 static syncable::ModelType model_type() { return syncable::THEMES; } 27 static syncable::ModelType model_type() { return syncable::THEMES; }
28 28
29 // AssociatorInterface implementation. 29 // AssociatorInterface implementation.
30 virtual bool AssociateModels(); 30 virtual bool AssociateModels(SyncError* error);
31 virtual bool DisassociateModels(); 31 virtual bool DisassociateModels(SyncError* error);
32 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes); 32 virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes);
33 virtual void AbortAssociation() { 33 virtual void AbortAssociation() {
34 // No implementation needed, this associator runs on the main 34 // No implementation needed, this associator runs on the main
35 // thread. 35 // thread.
36 } 36 }
37 virtual bool CryptoReadyIfNecessary(); 37 virtual bool CryptoReadyIfNecessary();
38 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