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

Side by Side Diff: sync/engine/sync_scheduler_impl.cc

Issue 310103004: Add integraton test for sync backup/rollback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | sync/test/fake_server/fake_server.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "sync/engine/sync_scheduler_impl.h" 5 #include "sync/engine/sync_scheduler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 25 matching lines...) Expand all
36 bool ShouldRequestEarlyExit(const SyncProtocolError& error) { 36 bool ShouldRequestEarlyExit(const SyncProtocolError& error) {
37 switch (error.error_type) { 37 switch (error.error_type) {
38 case SYNC_SUCCESS: 38 case SYNC_SUCCESS:
39 case MIGRATION_DONE: 39 case MIGRATION_DONE:
40 case THROTTLED: 40 case THROTTLED:
41 case TRANSIENT_ERROR: 41 case TRANSIENT_ERROR:
42 return false; 42 return false;
43 case NOT_MY_BIRTHDAY: 43 case NOT_MY_BIRTHDAY:
44 case CLEAR_PENDING: 44 case CLEAR_PENDING:
45 case DISABLED_BY_ADMIN: 45 case DISABLED_BY_ADMIN:
46 case USER_ROLLBACK:
46 // If we send terminate sync early then |sync_cycle_ended| notification 47 // If we send terminate sync early then |sync_cycle_ended| notification
47 // would not be sent. If there were no actions then |ACTIONABLE_ERROR| 48 // would not be sent. If there were no actions then |ACTIONABLE_ERROR|
48 // notification wouldnt be sent either. Then the UI layer would be left 49 // notification wouldnt be sent either. Then the UI layer would be left
49 // waiting forever. So assert we would send something. 50 // waiting forever. So assert we would send something.
50 DCHECK_NE(error.action, UNKNOWN_ACTION); 51 DCHECK_NE(error.action, UNKNOWN_ACTION);
51 return true; 52 return true;
52 case INVALID_CREDENTIAL: 53 case INVALID_CREDENTIAL:
53 // The notification for this is handled by PostAndProcessHeaders|. 54 // The notification for this is handled by PostAndProcessHeaders|.
54 // Server does no have to send any action for this. 55 // Server does no have to send any action for this.
55 return true; 56 return true;
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 911
911 #undef SDVLOG_LOC 912 #undef SDVLOG_LOC
912 913
913 #undef SDVLOG 914 #undef SDVLOG
914 915
915 #undef SLOG 916 #undef SLOG
916 917
917 #undef ENUM_CASE 918 #undef ENUM_CASE
918 919
919 } // namespace syncer 920 } // namespace syncer
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | sync/test/fake_server/fake_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698