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

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

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 syncer::SyncableService, 32 : public syncer::SyncableService,
33 public base::NonThreadSafe { 33 public base::NonThreadSafe {
34 public: 34 public:
35 PrefModelAssociator(); 35 PrefModelAssociator();
36 virtual ~PrefModelAssociator(); 36 virtual ~PrefModelAssociator();
37 37
38 // syncer::SyncableService implementation. 38 // syncer::SyncableService implementation.
39 virtual syncer::SyncDataList GetAllSyncData( 39 virtual syncer::SyncDataList GetAllSyncData(
40 syncable::ModelType type) const OVERRIDE; 40 syncer::ModelType type) const OVERRIDE;
41 virtual syncer::SyncError ProcessSyncChanges( 41 virtual syncer::SyncError ProcessSyncChanges(
42 const tracked_objects::Location& from_here, 42 const tracked_objects::Location& from_here,
43 const syncer::SyncChangeList& change_list) OVERRIDE; 43 const syncer::SyncChangeList& change_list) OVERRIDE;
44 virtual syncer::SyncError MergeDataAndStartSyncing( 44 virtual syncer::SyncError MergeDataAndStartSyncing(
45 syncable::ModelType type, 45 syncer::ModelType type,
46 const syncer::SyncDataList& initial_sync_data, 46 const syncer::SyncDataList& initial_sync_data,
47 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, 47 scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
48 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE; 48 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
49 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; 49 virtual void StopSyncing(syncer::ModelType type) OVERRIDE;
50 50
51 // Returns the list of preference names that are registered as syncable, and 51 // Returns the list of preference names that are registered as syncable, and
52 // hence should be monitored for changes. 52 // hence should be monitored for changes.
53 std::set<std::string> registered_preferences() const; 53 std::set<std::string> registered_preferences() const;
54 54
55 // Register a preference with the specified name for syncing. We do not care 55 // Register a preference with the specified name for syncing. We do not care
56 // about the type at registration time, but when changes arrive from the 56 // about the type at registration time, but when changes arrive from the
57 // syncer, we check if they can be applied and if not drop them. 57 // syncer, we check if they can be applied and if not drop them.
58 // Note: This should only be called at profile startup time (before sync 58 // Note: This should only be called at profile startup time (before sync
59 // begins). 59 // begins).
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Sync's syncer::SyncChange handler. We push all our changes through this. 145 // Sync's syncer::SyncChange handler. We push all our changes through this.
146 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; 146 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
147 147
148 // Sync's error handler. We use this to create sync errors. 148 // Sync's error handler. We use this to create sync errors.
149 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; 149 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); 151 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator);
152 }; 152 };
153 153
154 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ 154 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_service.cc ('k') | chrome/browser/prefs/pref_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698