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

Side by Side Diff: content/browser/utility_process_host.cc

Issue 8556001: Convert NewRunnableFunction/NewRunnableMethod calls to use base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 "content/browser/utility_process_host.h" 5 #include "content/browser/utility_process_host.h"
6 6
7 #include "base/bind.h"
7 #include "base/command_line.h" 8 #include "base/command_line.h"
8 #include "base/message_loop.h" 9 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
10 #include "content/common/utility_messages.h" 11 #include "content/common/utility_messages.h"
11 #include "content/public/browser/content_browser_client.h" 12 #include "content/public/browser/content_browser_client.h"
12 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
13 #include "ipc/ipc_switches.h" 14 #include "ipc/ipc_switches.h"
14 #include "ui/base/ui_base_switches.h" 15 #include "ui/base/ui_base_switches.h"
15 #include "webkit/plugins/plugin_switches.h" 16 #include "webkit/plugins/plugin_switches.h"
16 17
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 env_, 133 env_,
133 #endif 134 #endif
134 cmd_line); 135 cmd_line);
135 136
136 return true; 137 return true;
137 } 138 }
138 139
139 bool UtilityProcessHost::OnMessageReceived(const IPC::Message& message) { 140 bool UtilityProcessHost::OnMessageReceived(const IPC::Message& message) {
140 BrowserThread::PostTask( 141 BrowserThread::PostTask(
141 client_thread_id_, FROM_HERE, 142 client_thread_id_, FROM_HERE,
142 NewRunnableMethod(client_.get(), &Client::OnMessageReceived, message)); 143 base::IgnoreReturn<bool>(
James Hawkins 2011/11/14 17:57:06 #include "base/bind_helpers.h"
dcheng 2011/11/14 20:47:49 Done.
144 base::Bind(&Client::OnMessageReceived, client_.get(), message)));
143 return true; 145 return true;
144 } 146 }
145 147
146 void UtilityProcessHost::OnProcessCrashed(int exit_code) { 148 void UtilityProcessHost::OnProcessCrashed(int exit_code) {
147 BrowserThread::PostTask( 149 BrowserThread::PostTask(
148 client_thread_id_, FROM_HERE, 150 client_thread_id_, FROM_HERE,
149 NewRunnableMethod(client_.get(), &Client::OnProcessCrashed, exit_code)); 151 base::Bind(&Client::OnProcessCrashed, client_.get(), exit_code));
150 } 152 }
151 153
152 bool UtilityProcessHost::CanShutdown() { 154 bool UtilityProcessHost::CanShutdown() {
153 return true; 155 return true;
154 } 156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698