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

Unified Diff: chrome/browser/prefs/pref_model_associator.cc

Issue 7497014: Revert 94128 - [Sync] Refactor sync datatype error handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prefs/pref_model_associator.h ('k') | chrome/browser/sync/api/sync_change_processor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_model_associator.cc
===================================================================
--- chrome/browser/prefs/pref_model_associator.cc (revision 94142)
+++ chrome/browser/prefs/pref_model_associator.cc (working copy)
@@ -116,7 +116,7 @@
return;
}
-SyncError PrefModelAssociator::MergeDataAndStartSyncing(
+bool PrefModelAssociator::MergeDataAndStartSyncing(
syncable::ModelType type,
const SyncDataList& initial_sync_data,
SyncChangeProcessor* sync_processor) {
@@ -158,14 +158,9 @@
}
// Push updates to sync.
- SyncError error =
- sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
- if (error.IsSet()) {
- return error;
- }
-
+ sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes);
models_associated_ = true;
- return SyncError();
+ return true;
}
void PrefModelAssociator::StopSyncing(syncable::ModelType type) {
@@ -311,15 +306,11 @@
return current_data;
}
-SyncError PrefModelAssociator::ProcessSyncChanges(
+void PrefModelAssociator::ProcessSyncChanges(
const tracked_objects::Location& from_here,
const SyncChangeList& change_list) {
- if (!models_associated_) {
- SyncError error(FROM_HERE,
- "Models not yet associated.",
- PREFERENCES);
- return error;
- }
+ if (!models_associated_)
+ return;
AutoReset<bool> processing_changes(&processing_syncer_changes_, true);
SyncChangeList::const_iterator iter;
for (iter = change_list.begin(); iter != change_list.end(); ++iter) {
@@ -368,7 +359,6 @@
SendUpdateNotificationsIfNecessary(name);
}
- return SyncError();
}
Value* PrefModelAssociator::ReadPreferenceSpecifics(
@@ -442,9 +432,5 @@
}
changes.push_back(SyncChange(SyncChange::ACTION_UPDATE, sync_data));
}
-
- SyncError error =
- sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
- if (error.IsSet())
- StopSyncing(PREFERENCES);
+ sync_processor_->ProcessSyncChanges(FROM_HERE, changes);
}
« no previous file with comments | « chrome/browser/prefs/pref_model_associator.h ('k') | chrome/browser/sync/api/sync_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698