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

Side by Side Diff: chrome/browser/sync/sessions/sync_session.cc

Issue 9185031: Avoid SYNC_CYCLE_CONTINUATION sync cycles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 11 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/sessions/sync_session.h" 5 #include "chrome/browser/sync/sessions/sync_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/sync/syncable/directory_manager.h" 10 #include "chrome/browser/sync/syncable/directory_manager.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } 231 }
232 232
233 return enabled_groups_with_verified_updates; 233 return enabled_groups_with_verified_updates;
234 } 234 }
235 235
236 namespace { 236 namespace {
237 // Return true if the command in question was attempted and did not complete 237 // Return true if the command in question was attempted and did not complete
238 // successfully. 238 // successfully.
239 // 239 //
240 bool IsError(SyncerError error) { 240 bool IsError(SyncerError error) {
241 return error != UNSET && error != SYNCER_OK; 241 return error != UNSET
242 && error != SYNCER_OK
243 && error != SERVER_RETURN_MIGRATION_DONE;
242 } 244 }
243 } // namespace 245 } // namespace
244 246
245 bool SyncSession::Succeeded() const { 247 bool SyncSession::Succeeded() const {
246 const bool download_updates_error = 248 const bool download_updates_error =
247 IsError(status_controller_->error().last_download_updates_result); 249 IsError(status_controller_->error().last_download_updates_result);
248 const bool post_commit_error = 250 const bool post_commit_error =
249 IsError(status_controller_->error().last_post_commit_result); 251 IsError(status_controller_->error().last_post_commit_result);
250 const bool process_commit_response_error = 252 const bool process_commit_response_error =
251 IsError(status_controller_->error().last_process_commit_response_result); 253 IsError(status_controller_->error().last_process_commit_response_result);
252 return !download_updates_error 254 return !download_updates_error
253 && !post_commit_error 255 && !post_commit_error
254 && !process_commit_response_error; 256 && !process_commit_response_error;
255 } 257 }
256 258
257 } // namespace sessions 259 } // namespace sessions
258 } // namespace browser_sync 260 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_harness.cc ('k') | chrome/browser/sync/sessions/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698