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

Unified Diff: sync/sessions/sync_session.cc

Issue 10837231: sync: add InternalComponentsFactory::Switches to simplify passing switches to internal components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pass switches in test_profile_sync_service.cc Created 8 years, 4 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: sync/sessions/sync_session.cc
diff --git a/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc
index f4329785378060a7750b70ff5e38d6e74790236c..ee296682111b4449f3c6f9e2b59b20ea579f5354 100644
--- a/sync/sessions/sync_session.cc
+++ b/sync/sessions/sync_session.cc
@@ -239,18 +239,13 @@ std::set<ModelSafeGroup>
}
namespace {
-// Return true if the command in question was attempted and did not complete
-// successfully.
-bool IsError(SyncerError error) {
- return error != UNSET && error != SYNCER_OK;
-}
// Returns false iff one of the command results had an error.
bool HadErrors(const ModelNeutralState& state) {
- const bool get_key_error = IsError(state.last_get_key_result);
+ const bool get_key_error = SyncerErrorIsError(state.last_get_key_result);
const bool download_updates_error =
- IsError(state.last_download_updates_result);
- const bool commit_error = IsError(state.commit_result);
+ SyncerErrorIsError(state.last_download_updates_result);
+ const bool commit_error = SyncerErrorIsError(state.commit_result);
return get_key_error || download_updates_error || commit_error;
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698