| 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 "sync/engine/all_status.h" | 5 #include "sync/engine/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 "base/port.h" | 10 #include "base/port.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void AllStatus::OnRetryTimeChanged(base::Time retry_time) { | 115 void AllStatus::OnRetryTimeChanged(base::Time retry_time) { |
| 116 ScopedStatusLock lock(this); | 116 ScopedStatusLock lock(this); |
| 117 status_.retry_time = retry_time; | 117 status_.retry_time = retry_time; |
| 118 } | 118 } |
| 119 | 119 |
| 120 void AllStatus::OnThrottledTypesChanged(ModelTypeSet throttled_types) { | 120 void AllStatus::OnThrottledTypesChanged(ModelTypeSet throttled_types) { |
| 121 ScopedStatusLock lock(this); | 121 ScopedStatusLock lock(this); |
| 122 status_.throttled_types = throttled_types; | 122 status_.throttled_types = throttled_types; |
| 123 } | 123 } |
| 124 | 124 |
| 125 void AllStatus::OnMigrationRequested(ModelTypeSet) {} |
| 126 |
| 125 SyncStatus AllStatus::status() const { | 127 SyncStatus AllStatus::status() const { |
| 126 base::AutoLock lock(mutex_); | 128 base::AutoLock lock(mutex_); |
| 127 return status_; | 129 return status_; |
| 128 } | 130 } |
| 129 | 131 |
| 130 void AllStatus::SetNotificationsEnabled(bool notifications_enabled) { | 132 void AllStatus::SetNotificationsEnabled(bool notifications_enabled) { |
| 131 ScopedStatusLock lock(this); | 133 ScopedStatusLock lock(this); |
| 132 status_.notifications_enabled = notifications_enabled; | 134 status_.notifications_enabled = notifications_enabled; |
| 133 } | 135 } |
| 134 | 136 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) | 203 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) |
| 202 : allstatus_(allstatus) { | 204 : allstatus_(allstatus) { |
| 203 allstatus->mutex_.Acquire(); | 205 allstatus->mutex_.Acquire(); |
| 204 } | 206 } |
| 205 | 207 |
| 206 ScopedStatusLock::~ScopedStatusLock() { | 208 ScopedStatusLock::~ScopedStatusLock() { |
| 207 allstatus_->mutex_.Release(); | 209 allstatus_->mutex_.Release(); |
| 208 } | 210 } |
| 209 | 211 |
| 210 } // namespace syncer | 212 } // namespace syncer |
| OLD | NEW |