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

Side by Side Diff: chrome/browser/sync/glue/frontend_data_type_controller.cc

Issue 408003002: [Sync] Fix namespace for sync_driver component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 #include "chrome/browser/sync/glue/frontend_data_type_controller.h" 5 #include "chrome/browser/sync/glue/frontend_data_type_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h" 9 #include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h"
10 #include "chrome/browser/sync/profile_sync_components_factory.h" 10 #include "chrome/browser/sync/profile_sync_components_factory.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 syncer::ModelSafeGroup FrontendDataTypeController::model_safe_group() 133 syncer::ModelSafeGroup FrontendDataTypeController::model_safe_group()
134 const { 134 const {
135 return syncer::GROUP_UI; 135 return syncer::GROUP_UI;
136 } 136 }
137 137
138 std::string FrontendDataTypeController::name() const { 138 std::string FrontendDataTypeController::name() const {
139 // For logging only. 139 // For logging only.
140 return syncer::ModelTypeToString(type()); 140 return syncer::ModelTypeToString(type());
141 } 141 }
142 142
143 DataTypeController::State FrontendDataTypeController::state() const { 143 sync_driver::DataTypeController::State FrontendDataTypeController::state()
144 const {
144 return state_; 145 return state_;
145 } 146 }
146 147
147 void FrontendDataTypeController::OnSingleDatatypeUnrecoverableError( 148 void FrontendDataTypeController::OnSingleDatatypeUnrecoverableError(
148 const tracked_objects::Location& from_here, const std::string& message) { 149 const tracked_objects::Location& from_here, const std::string& message) {
149 RecordUnrecoverableError(from_here, message); 150 RecordUnrecoverableError(from_here, message);
150 syncer::SyncError error( 151 syncer::SyncError error(
151 from_here, syncer::SyncError::DATATYPE_ERROR, message, type()); 152 from_here, syncer::SyncError::DATATYPE_ERROR, message, type());
152 sync_service_->DisableDatatype(error); 153 sync_service_->DisableDatatype(error);
153 } 154 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeStartFailures", 300 UMA_HISTOGRAM_ENUMERATION("Sync.DataTypeStartFailures",
300 ModelTypeToHistogramInt(type()), 301 ModelTypeToHistogramInt(type()),
301 syncer::MODEL_TYPE_COUNT); 302 syncer::MODEL_TYPE_COUNT);
302 #define PER_DATA_TYPE_MACRO(type_str) \ 303 #define PER_DATA_TYPE_MACRO(type_str) \
303 UMA_HISTOGRAM_ENUMERATION("Sync." type_str "StartFailure", result, \ 304 UMA_HISTOGRAM_ENUMERATION("Sync." type_str "StartFailure", result, \
304 MAX_START_RESULT); 305 MAX_START_RESULT);
305 SYNC_DATA_TYPE_HISTOGRAM(type()); 306 SYNC_DATA_TYPE_HISTOGRAM(type());
306 #undef PER_DATA_TYPE_MACRO 307 #undef PER_DATA_TYPE_MACRO
307 } 308 }
308 309
309 AssociatorInterface* FrontendDataTypeController::model_associator() const { 310 sync_driver::AssociatorInterface* FrontendDataTypeController::model_associator()
311 const {
310 return model_associator_.get(); 312 return model_associator_.get();
311 } 313 }
312 314
313 void FrontendDataTypeController::set_model_associator( 315 void FrontendDataTypeController::set_model_associator(
314 AssociatorInterface* model_associator) { 316 sync_driver::AssociatorInterface* model_associator) {
315 model_associator_.reset(model_associator); 317 model_associator_.reset(model_associator);
316 } 318 }
317 319
318 ChangeProcessor* FrontendDataTypeController::GetChangeProcessor() const { 320 sync_driver::ChangeProcessor* FrontendDataTypeController::GetChangeProcessor()
321 const {
319 return change_processor_.get(); 322 return change_processor_.get();
320 } 323 }
321 324
322 void FrontendDataTypeController::set_change_processor( 325 void FrontendDataTypeController::set_change_processor(
323 ChangeProcessor* change_processor) { 326 sync_driver::ChangeProcessor* change_processor) {
324 change_processor_.reset(change_processor); 327 change_processor_.reset(change_processor);
325 } 328 }
326 329
327 } // namespace browser_sync 330 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698