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

Side by Side Diff: components/sync/engine_impl/all_status.cc

Issue 2475043002: [Sync] Sync client should to exponential backoff when receive partial failure (Closed)
Patch Set: rebase Created 4 years, 1 month 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
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 "components/sync/engine_impl/all_status.h" 5 #include "components/sync/engine_impl/all_status.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "components/sync/engine_impl/net/server_connection_manager.h" 10 #include "components/sync/engine_impl/net/server_connection_manager.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void AllStatus::OnRetryTimeChanged(base::Time retry_time) { 93 void AllStatus::OnRetryTimeChanged(base::Time retry_time) {
94 ScopedStatusLock lock(this); 94 ScopedStatusLock lock(this);
95 status_.retry_time = retry_time; 95 status_.retry_time = retry_time;
96 } 96 }
97 97
98 void AllStatus::OnThrottledTypesChanged(ModelTypeSet throttled_types) { 98 void AllStatus::OnThrottledTypesChanged(ModelTypeSet throttled_types) {
99 ScopedStatusLock lock(this); 99 ScopedStatusLock lock(this);
100 status_.throttled_types = throttled_types; 100 status_.throttled_types = throttled_types;
101 } 101 }
102 102
103 void AllStatus::OnBackedOffTypesChanged(ModelTypeSet backed_off_types) {
104 ScopedStatusLock lock(this);
105 status_.backed_off_types = backed_off_types;
106 }
107
103 void AllStatus::OnMigrationRequested(ModelTypeSet) {} 108 void AllStatus::OnMigrationRequested(ModelTypeSet) {}
104 109
105 void AllStatus::OnProtocolEvent(const ProtocolEvent&) {} 110 void AllStatus::OnProtocolEvent(const ProtocolEvent&) {}
106 111
107 SyncStatus AllStatus::status() const { 112 SyncStatus AllStatus::status() const {
108 base::AutoLock lock(mutex_); 113 base::AutoLock lock(mutex_);
109 return status_; 114 return status_;
110 } 115 }
111 116
112 void AllStatus::SetNotificationsEnabled(bool notifications_enabled) { 117 void AllStatus::SetNotificationsEnabled(bool notifications_enabled) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) 188 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus)
184 : allstatus_(allstatus) { 189 : allstatus_(allstatus) {
185 allstatus->mutex_.Acquire(); 190 allstatus->mutex_.Acquire();
186 } 191 }
187 192
188 ScopedStatusLock::~ScopedStatusLock() { 193 ScopedStatusLock::~ScopedStatusLock() {
189 allstatus_->mutex_.Release(); 194 allstatus_->mutex_.Release();
190 } 195 }
191 196
192 } // namespace syncer 197 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/all_status.h ('k') | components/sync/engine_impl/cycle/data_type_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698