| 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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 } | 1247 } |
| 1248 | 1248 |
| 1249 void SyncManager::RequestEarlyExit() { | 1249 void SyncManager::RequestEarlyExit() { |
| 1250 data_->RequestEarlyExit(); | 1250 data_->RequestEarlyExit(); |
| 1251 } | 1251 } |
| 1252 | 1252 |
| 1253 void SyncManager::SyncInternal::RequestEarlyExit() { | 1253 void SyncManager::SyncInternal::RequestEarlyExit() { |
| 1254 if (scheduler()) { | 1254 if (scheduler()) { |
| 1255 scheduler()->RequestEarlyExit(); | 1255 scheduler()->RequestEarlyExit(); |
| 1256 } | 1256 } |
| 1257 |
| 1258 if (connection_manager_.get()) { |
| 1259 connection_manager_->TerminateAllIO(); |
| 1260 } |
| 1257 } | 1261 } |
| 1258 | 1262 |
| 1259 void SyncManager::Shutdown() { | 1263 void SyncManager::Shutdown() { |
| 1260 data_->Shutdown(); | 1264 data_->Shutdown(); |
| 1261 } | 1265 } |
| 1262 | 1266 |
| 1263 void SyncManager::SyncInternal::Shutdown() { | 1267 void SyncManager::SyncInternal::Shutdown() { |
| 1264 DCHECK(thread_checker_.CalledOnValidThread()); | 1268 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1265 | 1269 |
| 1266 // Prevent any in-flight method calls from running. Also | 1270 // Prevent any in-flight method calls from running. Also |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2120 | 2124 |
| 2121 for (syncable::ModelTypeSet::const_iterator i = types.begin(); | 2125 for (syncable::ModelTypeSet::const_iterator i = types.begin(); |
| 2122 i != types.end(); ++i) { | 2126 i != types.end(); ++i) { |
| 2123 if (!lookup->initial_sync_ended_for_type(*i)) | 2127 if (!lookup->initial_sync_ended_for_type(*i)) |
| 2124 return false; | 2128 return false; |
| 2125 } | 2129 } |
| 2126 return true; | 2130 return true; |
| 2127 } | 2131 } |
| 2128 | 2132 |
| 2129 } // namespace sync_api | 2133 } // namespace sync_api |
| OLD | NEW |