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

Side by Side Diff: chrome/browser/prefs/pref_model_associator.h

Issue 7453014: [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix final unit test <3 c++ 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
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_model_associator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PREFS_PREF_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 19 matching lines...) Expand all
30 // PrefService from the local state PrefService. 30 // PrefService from the local state PrefService.
31 class PrefModelAssociator 31 class PrefModelAssociator
32 : public SyncableService, 32 : public SyncableService,
33 public base::NonThreadSafe { 33 public base::NonThreadSafe {
34 public: 34 public:
35 explicit PrefModelAssociator(PrefService* pref_service); 35 explicit PrefModelAssociator(PrefService* pref_service);
36 virtual ~PrefModelAssociator(); 36 virtual ~PrefModelAssociator();
37 37
38 // SyncableService implementation. 38 // SyncableService implementation.
39 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE; 39 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE;
40 virtual void ProcessSyncChanges(const tracked_objects::Location& from_here, 40 virtual SyncError ProcessSyncChanges(
41 const SyncChangeList& change_list) OVERRIDE; 41 const tracked_objects::Location& from_here,
42 virtual bool MergeDataAndStartSyncing( 42 const SyncChangeList& change_list) OVERRIDE;
43 virtual SyncError MergeDataAndStartSyncing(
43 syncable::ModelType type, 44 syncable::ModelType type,
44 const SyncDataList& initial_sync_data, 45 const SyncDataList& initial_sync_data,
45 SyncChangeProcessor* sync_processor) OVERRIDE; 46 SyncChangeProcessor* sync_processor) OVERRIDE;
46 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; 47 virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
47 48
48 // Returns the list of preference names that are registered as syncable, and 49 // Returns the list of preference names that are registered as syncable, and
49 // hence should be monitored for changes. 50 // hence should be monitored for changes.
50 std::set<std::string> registered_preferences() const; 51 std::set<std::string> registered_preferences() const;
51 52
52 // Register a preference with the specified name for syncing. We do not care 53 // Register a preference with the specified name for syncing. We do not care
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // The PrefService we are syncing to. 141 // The PrefService we are syncing to.
141 PrefService* pref_service_; 142 PrefService* pref_service_;
142 143
143 // Sync's SyncChange handler. We push all our changes through this. 144 // Sync's SyncChange handler. We push all our changes through this.
144 SyncChangeProcessor* sync_processor_; 145 SyncChangeProcessor* sync_processor_;
145 146
146 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); 147 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator);
147 }; 148 };
148 149
149 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ 150 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698