| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/engine/syncapi.h" | 5 #include "chrome/browser/sync/engine/syncapi.h" | 
| 6 | 6 | 
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" | 
| 8 | 8 | 
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) | 
| 10 #include <windows.h> | 10 #include <windows.h> | 
| (...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1222   // Stop the address watch thread by signaling the exit flag. | 1222   // Stop the address watch thread by signaling the exit flag. | 
| 1223   // TODO(timsteele): Same as todo in Init(). | 1223   // TODO(timsteele): Same as todo in Init(). | 
| 1224   SetEvent(address_watch_params_.exit_flag); | 1224   SetEvent(address_watch_params_.exit_flag); | 
| 1225   const DWORD wait_result = WaitForSingleObject(address_watch_thread_, | 1225   const DWORD wait_result = WaitForSingleObject(address_watch_thread_, | 
| 1226                                                 kThreadExitTimeoutMsec); | 1226                                                 kThreadExitTimeoutMsec); | 
| 1227   LOG_IF(ERROR, WAIT_FAILED == wait_result) << "Waiting for addr change thread " | 1227   LOG_IF(ERROR, WAIT_FAILED == wait_result) << "Waiting for addr change thread " | 
| 1228       "to exit failed. GetLastError(): " << hex << GetLastError(); | 1228       "to exit failed. GetLastError(): " << hex << GetLastError(); | 
| 1229   LOG_IF(ERROR, WAIT_TIMEOUT == wait_result) << "Thread exit timeout expired"; | 1229   LOG_IF(ERROR, WAIT_TIMEOUT == wait_result) << "Thread exit timeout expired"; | 
| 1230   CloseHandle(address_watch_params_.exit_flag); | 1230   CloseHandle(address_watch_params_.exit_flag); | 
| 1231 #endif | 1231 #endif | 
|  | 1232 | 
|  | 1233   CommandLine::Terminate(); | 
| 1232 } | 1234 } | 
| 1233 | 1235 | 
| 1234 // Listen to model changes, filter out ones initiated by the sync API, and | 1236 // Listen to model changes, filter out ones initiated by the sync API, and | 
| 1235 // saves the rest (hopefully just backend Syncer changes resulting from | 1237 // saves the rest (hopefully just backend Syncer changes resulting from | 
| 1236 // ApplyUpdates) to data_->changelist. | 1238 // ApplyUpdates) to data_->changelist. | 
| 1237 void SyncManager::SyncInternal::HandleChangeEvent( | 1239 void SyncManager::SyncInternal::HandleChangeEvent( | 
| 1238     const syncable::DirectoryChangeEvent& event) { | 1240     const syncable::DirectoryChangeEvent& event) { | 
| 1239   if (event.todo == syncable::DirectoryChangeEvent::TRANSACTION_COMPLETE) { | 1241   if (event.todo == syncable::DirectoryChangeEvent::TRANSACTION_COMPLETE) { | 
| 1240     HandleTransactionCompleteChangeEvent(event); | 1242     HandleTransactionCompleteChangeEvent(event); | 
| 1241     return; | 1243     return; | 
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1567 BaseTransaction::~BaseTransaction() { | 1569 BaseTransaction::~BaseTransaction() { | 
| 1568   delete lookup_; | 1570   delete lookup_; | 
| 1569 } | 1571 } | 
| 1570 | 1572 | 
| 1571 UserShare* SyncManager::GetUserShare() const { | 1573 UserShare* SyncManager::GetUserShare() const { | 
| 1572   DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; | 1574   DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; | 
| 1573   return data_->GetUserShare(); | 1575   return data_->GetUserShare(); | 
| 1574 } | 1576 } | 
| 1575 | 1577 | 
| 1576 }  // namespace sync_api | 1578 }  // namespace sync_api | 
| OLD | NEW | 
|---|