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

Side by Side Diff: chrome/service/cloud_print/cloud_print_proxy_backend.cc

Issue 6794005: Move sync notifier contruction out of syncer thread. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressing comments and rebase. Created 9 years, 8 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
OLDNEW
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/service/cloud_print/cloud_print_proxy_backend.h" 5 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 print_server_watcher_->StopWatching(); 442 print_server_watcher_->StopWatching();
443 443
444 // Need to kill all running jobs. 444 // Need to kill all running jobs.
445 while (!job_handler_map_.empty()) { 445 while (!job_handler_map_.empty()) {
446 JobHandlerMap::iterator index = job_handler_map_.begin(); 446 JobHandlerMap::iterator index = job_handler_map_.begin();
447 // Shutdown will call our OnPrinterJobHandlerShutdown method which will 447 // Shutdown will call our OnPrinterJobHandlerShutdown method which will
448 // remove this from the map. 448 // remove this from the map.
449 index->second->Shutdown(); 449 index->second->Shutdown();
450 } 450 }
451 // Important to delete the TalkMediator on this thread. 451 // Important to delete the TalkMediator on this thread.
452 talk_mediator_->Logout();
452 talk_mediator_.reset(); 453 talk_mediator_.reset();
453 notifications_enabled_ = false; 454 notifications_enabled_ = false;
454 notifications_enabled_since_ = base::TimeTicks(); 455 notifications_enabled_since_ = base::TimeTicks();
455 request_ = NULL; 456 request_ = NULL;
456 } 457 }
457 458
458 void CloudPrintProxyBackend::Core::DoRegisterSelectedPrinters( 459 void CloudPrintProxyBackend::Core::DoRegisterSelectedPrinters(
459 const printing::PrinterList& printer_list) { 460 const printing::PrinterList& printer_list) {
460 DCHECK(MessageLoop::current() == backend_->core_thread_.message_loop()); 461 DCHECK(MessageLoop::current() == backend_->core_thread_.message_loop());
461 if (!print_system_.get()) 462 if (!print_system_.get())
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 &Core::NotifyAuthenticationFailed)); 935 &Core::NotifyAuthenticationFailed));
935 } 936 }
936 937
937 void CloudPrintProxyBackend::Core::OnPrinterNotFound( 938 void CloudPrintProxyBackend::Core::OnPrinterNotFound(
938 const std::string& printer_name, 939 const std::string& printer_name,
939 bool* delete_from_server) { 940 bool* delete_from_server) {
940 // If we have a complete list of local printers, then this needs to be deleted 941 // If we have a complete list of local printers, then this needs to be deleted
941 // from the server. 942 // from the server.
942 *delete_from_server = complete_list_available_; 943 *delete_from_server = complete_list_available_;
943 } 944 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698