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

Unified Diff: chrome/browser/sync/glue/ui_data_type_controller.cc

Issue 10662035: [Sync] Put everything in sync/api into csync namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/ui_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/ui_data_type_controller.cc b/chrome/browser/sync/glue/ui_data_type_controller.cc
index cc0e1eaf01f020a10f45460591579f515122a1fa..dd41c8c70254d41a7c4abb806960723d62eba934 100644
--- a/chrome/browser/sync/glue/ui_data_type_controller.cc
+++ b/chrome/browser/sync/glue/ui_data_type_controller.cc
@@ -54,7 +54,7 @@ void UIDataTypeController::LoadModels(
DCHECK(!model_load_callback.is_null());
DCHECK(syncable::IsRealDataType(type_));
if (state_ != NOT_RUNNING) {
- model_load_callback.Run(type(), SyncError(FROM_HERE,
+ model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
"Model already loaded",
type()));
return;
@@ -79,7 +79,7 @@ void UIDataTypeController::LoadModels(
state_ = MODEL_LOADED;
model_load_callback_.Reset();
- model_load_callback.Run(type(), SyncError());
+ model_load_callback.Run(type(), csync::SyncError());
}
void UIDataTypeController::OnModelLoaded() {
@@ -90,7 +90,7 @@ void UIDataTypeController::OnModelLoaded() {
state_ = MODEL_LOADED;
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), SyncError());
+ model_load_callback.Run(type(), csync::SyncError());
}
void UIDataTypeController::StartAssociating(
@@ -118,33 +118,33 @@ void UIDataTypeController::Associate() {
DCHECK_EQ(state_, ASSOCIATING);
// Connect |shared_change_processor_| to the syncer and get the
- // SyncableService associated with type().
+ // csync::SyncableService associated with type().
local_service_ = shared_change_processor_->Connect(profile_sync_factory_,
sync_service_,
this,
type());
if (!local_service_.get()) {
- SyncError error(FROM_HERE, "Failed to connect to syncer.", type());
+ csync::SyncError error(FROM_HERE, "Failed to connect to syncer.", type());
StartFailed(UNRECOVERABLE_ERROR, error);
return;
}
if (!shared_change_processor_->CryptoReadyIfNecessary()) {
- StartFailed(NEEDS_CRYPTO, SyncError());
+ StartFailed(NEEDS_CRYPTO, csync::SyncError());
return;
}
bool sync_has_nodes = false;
if (!shared_change_processor_->SyncModelHasUserCreatedNodes(
&sync_has_nodes)) {
- SyncError error(FROM_HERE, "Failed to load sync nodes", type());
+ csync::SyncError error(FROM_HERE, "Failed to load sync nodes", type());
StartFailed(UNRECOVERABLE_ERROR, error);
return;
}
base::TimeTicks start_time = base::TimeTicks::Now();
- SyncError error;
- SyncDataList initial_sync_data;
+ csync::SyncError error;
+ csync::SyncDataList initial_sync_data;
error = shared_change_processor_->GetSyncData(&initial_sync_data);
if (error.IsSet()) {
StartFailed(ASSOCIATION_FAILED, error);
@@ -155,9 +155,9 @@ void UIDataTypeController::Associate() {
error = local_service_->MergeDataAndStartSyncing(
type(),
initial_sync_data,
- scoped_ptr<SyncChangeProcessor>(
+ scoped_ptr<csync::SyncChangeProcessor>(
new SharedChangeProcessorRef(shared_change_processor_)),
- scoped_ptr<SyncErrorFactory>(
+ scoped_ptr<csync::SyncErrorFactory>(
new SharedChangeProcessorRef(shared_change_processor_)));
RecordAssociationTime(base::TimeTicks::Now() - start_time);
if (error.IsSet()) {
@@ -171,7 +171,7 @@ void UIDataTypeController::Associate() {
}
void UIDataTypeController::StartFailed(StartResult result,
- const SyncError& error) {
+ const csync::SyncError& error) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (IsUnrecoverableResult(result))
RecordUnrecoverableError(FROM_HERE, "StartFailed");
@@ -206,7 +206,7 @@ void UIDataTypeController::AbortModelLoad() {
ModelLoadCallback model_load_callback = model_load_callback_;
model_load_callback_.Reset();
- model_load_callback.Run(type(), SyncError(FROM_HERE,
+ model_load_callback.Run(type(), csync::SyncError(FROM_HERE,
"Aborted",
type()));
}
@@ -219,7 +219,7 @@ void UIDataTypeController::StartDone(StartResult result) {
// confused by the non-NULL start_callback_.
StartCallback callback = start_callback_;
start_callback_.Reset();
- callback.Run(result, SyncError());
+ callback.Run(result, csync::SyncError());
}
void UIDataTypeController::Stop() {
« no previous file with comments | « chrome/browser/sync/glue/ui_data_type_controller.h ('k') | chrome/browser/sync/glue/ui_data_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698