| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 status_.nudge_source_notification++; | 178 status_.nudge_source_notification++; |
| 179 return; | 179 return; |
| 180 case NUDGE_SOURCE_UNKNOWN: | 180 case NUDGE_SOURCE_UNKNOWN: |
| 181 break; | 181 break; |
| 182 } | 182 } |
| 183 // If we're here, the source is most likely | 183 // If we're here, the source is most likely |
| 184 // NUDGE_SOURCE_UNKNOWN. That shouldn't happen. | 184 // NUDGE_SOURCE_UNKNOWN. That shouldn't happen. |
| 185 NOTREACHED(); | 185 NOTREACHED(); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void AllStatus::SetLocalBackendFolder(const std::string& folder) { |
| 189 ScopedStatusLock lock(this); |
| 190 status_.local_sync_folder = folder; |
| 191 } |
| 192 |
| 188 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) | 193 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) |
| 189 : allstatus_(allstatus) { | 194 : allstatus_(allstatus) { |
| 190 allstatus->mutex_.Acquire(); | 195 allstatus->mutex_.Acquire(); |
| 191 } | 196 } |
| 192 | 197 |
| 193 ScopedStatusLock::~ScopedStatusLock() { | 198 ScopedStatusLock::~ScopedStatusLock() { |
| 194 allstatus_->mutex_.Release(); | 199 allstatus_->mutex_.Release(); |
| 195 } | 200 } |
| 196 | 201 |
| 197 } // namespace syncer | 202 } // namespace syncer |
| OLD | NEW |