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

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

Issue 8274020: Revert 105404 - [Sync] Refactor non-frontend DTC to handle new API properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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_NON_FRONTEND_DATA_TYPE_CONTROLLER_H__ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_NON_FRONTEND_DATA_TYPE_CONTROLLER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_NON_FRONTEND_DATA_TYPE_CONTROLLER_H__ 6 #define CHROME_BROWSER_SYNC_GLUE_NON_FRONTEND_DATA_TYPE_CONTROLLER_H__
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 const std::string& message) = 0; 126 const std::string& message) = 0;
127 // Record association time. Called on Datatype's thread. 127 // Record association time. Called on Datatype's thread.
128 virtual void RecordAssociationTime(base::TimeDelta time) = 0; 128 virtual void RecordAssociationTime(base::TimeDelta time) = 0;
129 // Record causes of start failure. Called on UI thread. 129 // Record causes of start failure. Called on UI thread.
130 virtual void RecordStartFailure(StartResult result) = 0; 130 virtual void RecordStartFailure(StartResult result) = 0;
131 131
132 // Accessors and mutators used by derived classes. 132 // Accessors and mutators used by derived classes.
133 ProfileSyncFactory* profile_sync_factory() const; 133 ProfileSyncFactory* profile_sync_factory() const;
134 Profile* profile() const; 134 Profile* profile() const;
135 ProfileSyncService* profile_sync_service() const; 135 ProfileSyncService* profile_sync_service() const;
136 void set_start_callback(StartCallback* callback);
137 void set_state(State state); 136 void set_state(State state);
138 137 void set_model_associator(AssociatorInterface* associator);
139 virtual AssociatorInterface* associator() const; 138 void set_change_processor(ChangeProcessor* change_processor);
140 virtual void set_model_associator(AssociatorInterface* associator);
141 virtual ChangeProcessor* change_processor() const;
142 virtual void set_change_processor(ChangeProcessor* change_processor);
143 139
144 private: 140 private:
145 ProfileSyncFactory* const profile_sync_factory_; 141 ProfileSyncFactory* const profile_sync_factory_;
146 Profile* const profile_; 142 Profile* const profile_;
147 ProfileSyncService* const profile_sync_service_; 143 ProfileSyncService* const profile_sync_service_;
148 144
149 State state_; 145 State state_;
150 146
151 scoped_ptr<StartCallback> start_callback_; 147 scoped_ptr<StartCallback> start_callback_;
152 scoped_ptr<AssociatorInterface> model_associator_; 148 scoped_ptr<AssociatorInterface> model_associator_;
153 scoped_ptr<ChangeProcessor> change_processor_; 149 scoped_ptr<ChangeProcessor> change_processor_;
154 150
155 // Locks/Barriers for aborting association early. 151 // Locks/Barriers for aborting association early.
156 base::Lock abort_association_lock_; 152 base::Lock abort_association_lock_;
157 bool abort_association_; 153 bool abort_association_;
158 base::WaitableEvent abort_association_complete_; 154 base::WaitableEvent abort_association_complete_;
159 155
160 // Barrier to ensure that the datatype has been stopped on the DB thread 156 // Barrier to ensure that the datatype has been stopped on the DB thread
161 // from the UI thread. 157 // from the UI thread.
162 base::WaitableEvent datatype_stopped_; 158 base::WaitableEvent datatype_stopped_;
163 159
164 DISALLOW_COPY_AND_ASSIGN(NonFrontendDataTypeController); 160 DISALLOW_COPY_AND_ASSIGN(NonFrontendDataTypeController);
165 }; 161 };
166 162
167 } // namespace browser_sync 163 } // namespace browser_sync
168 164
169 #endif // CHROME_BROWSER_SYNC_GLUE_NON_FRONTEND_DATA_TYPE_CONTROLLER_H__ 165 #endif // CHROME_BROWSER_SYNC_GLUE_NON_FRONTEND_DATA_TYPE_CONTROLLER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698