| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |