| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/sync/internal_api/sync_manager.h" | 5 #include "chrome/browser/sync/internal_api/sync_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 void SyncManager::RequestEarlyExit() { | 1197 void SyncManager::RequestEarlyExit() { |
| 1198 data_->RequestEarlyExit(); | 1198 data_->RequestEarlyExit(); |
| 1199 } | 1199 } |
| 1200 | 1200 |
| 1201 void SyncManager::SyncInternal::RequestEarlyExit() { | 1201 void SyncManager::SyncInternal::RequestEarlyExit() { |
| 1202 if (scheduler()) { | 1202 if (scheduler()) { |
| 1203 scheduler()->RequestEarlyExit(); | 1203 scheduler()->RequestEarlyExit(); |
| 1204 } | 1204 } |
| 1205 |
| 1206 if (connection_manager_.get()) { |
| 1207 connection_manager_->TerminateAllIO(); |
| 1208 } |
| 1205 } | 1209 } |
| 1206 | 1210 |
| 1207 void SyncManager::Shutdown() { | 1211 void SyncManager::Shutdown() { |
| 1208 data_->Shutdown(); | 1212 data_->Shutdown(); |
| 1209 } | 1213 } |
| 1210 | 1214 |
| 1211 void SyncManager::SyncInternal::Shutdown() { | 1215 void SyncManager::SyncInternal::Shutdown() { |
| 1212 DCHECK(thread_checker_.CalledOnValidThread()); | 1216 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1213 | 1217 |
| 1214 // Prevent any in-flight method calls from running. Also | 1218 // Prevent any in-flight method calls from running. Also |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 | 2062 |
| 2059 for (syncable::ModelTypeSet::const_iterator i = types.begin(); | 2063 for (syncable::ModelTypeSet::const_iterator i = types.begin(); |
| 2060 i != types.end(); ++i) { | 2064 i != types.end(); ++i) { |
| 2061 if (!lookup->initial_sync_ended_for_type(*i)) | 2065 if (!lookup->initial_sync_ended_for_type(*i)) |
| 2062 return false; | 2066 return false; |
| 2063 } | 2067 } |
| 2064 return true; | 2068 return true; |
| 2065 } | 2069 } |
| 2066 | 2070 |
| 2067 } // namespace sync_api | 2071 } // namespace sync_api |
| OLD | NEW |