| 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" |
| 11 #include "sync/engine/net/server_connection_manager.h" | 11 #include "sync/engine/net/server_connection_manager.h" |
| 12 #include "sync/internal_api/public/base/model_type.h" | 12 #include "sync/internal_api/public/base/model_type.h" |
| 13 #include "sync/sessions/session_state.h" | |
| 14 | 13 |
| 15 namespace syncer { | 14 namespace syncer { |
| 16 | 15 |
| 17 AllStatus::AllStatus() { | 16 AllStatus::AllStatus() { |
| 18 status_.initial_sync_ended = true; | 17 status_.initial_sync_ended = true; |
| 19 status_.notifications_enabled = false; | 18 status_.notifications_enabled = false; |
| 20 status_.cryptographer_ready = false; | 19 status_.cryptographer_ready = false; |
| 21 status_.crypto_has_pending_keys = false; | 20 status_.crypto_has_pending_keys = false; |
| 22 } | 21 } |
| 23 | 22 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) | 161 ScopedStatusLock::ScopedStatusLock(AllStatus* allstatus) |
| 163 : allstatus_(allstatus) { | 162 : allstatus_(allstatus) { |
| 164 allstatus->mutex_.Acquire(); | 163 allstatus->mutex_.Acquire(); |
| 165 } | 164 } |
| 166 | 165 |
| 167 ScopedStatusLock::~ScopedStatusLock() { | 166 ScopedStatusLock::~ScopedStatusLock() { |
| 168 allstatus_->mutex_.Release(); | 167 allstatus_->mutex_.Release(); |
| 169 } | 168 } |
| 170 | 169 |
| 171 } // namespace syncer | 170 } // namespace syncer |
| OLD | NEW |