Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: chrome/browser/sync/engine/syncapi.cc

Issue 984001: Force TalkMediator::Logout to wait until the Login task has been destroyed an... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/notifier/listener/mediator_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 auth_watcher_->Shutdown(); 1478 auth_watcher_->Shutdown();
1479 auth_watcher_ = NULL; 1479 auth_watcher_ = NULL;
1480 } 1480 }
1481 1481
1482 if (syncer_thread()) { 1482 if (syncer_thread()) {
1483 if (!syncer_thread()->Stop(kThreadExitTimeoutMsec)) 1483 if (!syncer_thread()->Stop(kThreadExitTimeoutMsec))
1484 DCHECK(false) << "Unable to stop the syncer, it won't be happy..."; 1484 DCHECK(false) << "Unable to stop the syncer, it won't be happy...";
1485 } 1485 }
1486 1486
1487 // Shutdown the xmpp buzz connection. 1487 // Shutdown the xmpp buzz connection.
1488 LOG(INFO) << "P2P: Mediator logout started.";
1489 if (talk_mediator()) { 1488 if (talk_mediator()) {
1489 LOG(INFO) << "P2P: Mediator logout started.";
1490 talk_mediator()->Logout(); 1490 talk_mediator()->Logout();
1491 LOG(INFO) << "P2P: Mediator logout completed.";
1492 talk_mediator_.reset();
1493 LOG(INFO) << "P2P: Mediator destroyed.";
1491 } 1494 }
1492 LOG(INFO) << "P2P: Mediator logout completed.";
1493 1495
1494 if (dir_manager()) { 1496 if (dir_manager()) {
1495 dir_manager()->FinalSaveChangesForAll(); 1497 dir_manager()->FinalSaveChangesForAll();
1496 dir_manager()->Close(username_for_share()); 1498 dir_manager()->Close(username_for_share());
1497 } 1499 }
1498 1500
1499 // Reset the DirectoryManager and UserSettings so they relinquish sqlite 1501 // Reset the DirectoryManager and UserSettings so they relinquish sqlite
1500 // handles to backing files. 1502 // handles to backing files.
1501 share_.dir_manager.reset(); 1503 share_.dir_manager.reset();
1502 user_settings_.reset(); 1504 user_settings_.reset();
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1895 BaseTransaction::~BaseTransaction() { 1897 BaseTransaction::~BaseTransaction() {
1896 delete lookup_; 1898 delete lookup_;
1897 } 1899 }
1898 1900
1899 UserShare* SyncManager::GetUserShare() const { 1901 UserShare* SyncManager::GetUserShare() const {
1900 DCHECK(data_->initialized()) << "GetUserShare requires initialization!"; 1902 DCHECK(data_->initialized()) << "GetUserShare requires initialization!";
1901 return data_->GetUserShare(); 1903 return data_->GetUserShare();
1902 } 1904 }
1903 1905
1904 } // namespace sync_api 1906 } // namespace sync_api
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/notifier/listener/mediator_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698