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

Side by Side Diff: chrome/browser/service/service_process_control.cc

Issue 5513001: Add a base class for objects that want to filter messages on the UI thread. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix possible race condition Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/service/service_process_control.h" 5 #include "chrome/browser/service/service_process_control.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 // Actually going to connect. 117 // Actually going to connect.
118 VLOG(1) << "Connecting to Service Process IPC Server"; 118 VLOG(1) << "Connecting to Service Process IPC Server";
119 // Run the IPC channel on the shared IO thread. 119 // Run the IPC channel on the shared IO thread.
120 base::Thread* io_thread = g_browser_process->io_thread(); 120 base::Thread* io_thread = g_browser_process->io_thread();
121 121
122 // TODO(hclam): Handle error connecting to channel. 122 // TODO(hclam): Handle error connecting to channel.
123 const std::string channel_id = GetServiceProcessChannelName(); 123 const std::string channel_id = GetServiceProcessChannelName();
124 channel_.reset( 124 channel_.reset(
125 new IPC::SyncChannel(channel_id, IPC::Channel::MODE_CLIENT, this, NULL, 125 new IPC::SyncChannel(channel_id, IPC::Channel::MODE_CLIENT, this,
126 io_thread->message_loop(), true, 126 io_thread->message_loop(), true,
127 g_browser_process->shutdown_event())); 127 g_browser_process->shutdown_event()));
128 channel_->set_sync_messages_with_no_timeout_allowed(false); 128 channel_->set_sync_messages_with_no_timeout_allowed(false);
129 129
130 // We just established a channel with the service process. Notify it if an 130 // We just established a channel with the service process. Notify it if an
131 // upgrade is available. 131 // upgrade is available.
132 if (Singleton<UpgradeDetector>::get()->notify_upgrade()) { 132 if (Singleton<UpgradeDetector>::get()->notify_upgrade()) {
133 Send(new ServiceMsg_UpdateAvailable); 133 Send(new ServiceMsg_UpdateAvailable);
134 } else { 134 } else {
135 if (registrar_.IsEmpty()) 135 if (registrar_.IsEmpty())
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 310 }
311 311
312 bool ServiceProcessControl::GetCloudPrintProxyStatus( 312 bool ServiceProcessControl::GetCloudPrintProxyStatus(
313 Callback2<bool, std::string>::Type* cloud_print_status_callback) { 313 Callback2<bool, std::string>::Type* cloud_print_status_callback) {
314 DCHECK(cloud_print_status_callback); 314 DCHECK(cloud_print_status_callback);
315 cloud_print_status_callback_.reset(cloud_print_status_callback); 315 cloud_print_status_callback_.reset(cloud_print_status_callback);
316 return Send(new ServiceMsg_IsCloudPrintProxyEnabled); 316 return Send(new ServiceMsg_IsCloudPrintProxyEnabled);
317 } 317 }
318 318
319 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControl); 319 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControl);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698