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

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

Issue 8770027: Get rid of the ChildProcessInfo class. It was carrying unnecessary data, and the fact that some p... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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) 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/mach_broker_mac.h" 5 #include "content/browser/mach_broker_mac.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/mac/foundation_util.h" 11 #include "base/mac/foundation_util.h"
12 #include "base/mach_ipc_mac.h" 12 #include "base/mach_ipc_mac.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "base/sys_string_conversions.h" 15 #include "base/sys_string_conversions.h"
16 #include "base/threading/platform_thread.h" 16 #include "base/threading/platform_thread.h"
17 #include "content/browser/renderer_host/render_process_host_impl.h" 17 #include "content/browser/renderer_host/render_process_host_impl.h"
18 #include "content/common/child_process_info.h" 18 #include "content/public/browser/child_process_data.h"
19 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
20 #include "content/public/browser/notification_service.h" 20 #include "content/public/browser/notification_service.h"
21 #include "content/public/browser/notification_types.h" 21 #include "content/public/browser/notification_types.h"
22 #include "content/public/common/content_switches.h" 22 #include "content/public/common/content_switches.h"
23 23
24 using content::BrowserThread; 24 using content::BrowserThread;
25 25
26 namespace { 26 namespace {
27 // Prints a string representation of a Mach error code. 27 // Prints a string representation of a Mach error code.
28 std::string MachErrorCode(kern_return_t err) { 28 std::string MachErrorCode(kern_return_t err) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 handle = 184 handle =
185 content::Details<content::RenderProcessHost::RendererClosedDetails>( 185 content::Details<content::RenderProcessHost::RendererClosedDetails>(
186 details)->handle; 186 details)->handle;
187 break; 187 break;
188 case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: 188 case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED:
189 handle = content::Source<content::RenderProcessHost>(source)-> 189 handle = content::Source<content::RenderProcessHost>(source)->
190 GetHandle(); 190 GetHandle();
191 break; 191 break;
192 case content::NOTIFICATION_CHILD_PROCESS_CRASHED: 192 case content::NOTIFICATION_CHILD_PROCESS_CRASHED:
193 case content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED: 193 case content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED:
194 handle = content::Details<ChildProcessInfo>(details)->handle(); 194 handle = content::Details<content::ChildProcessData>(details)->handle;
195 break; 195 break;
196 default: 196 default:
197 NOTREACHED() << "Unexpected notification"; 197 NOTREACHED() << "Unexpected notification";
198 break; 198 break;
199 } 199 }
200 InvalidatePid(handle); 200 InvalidatePid(handle);
201 } 201 }
202 202
203 // static 203 // static
204 std::string MachBroker::GetMachPortName() { 204 std::string MachBroker::GetMachPortName() {
(...skipping 13 matching lines...) Expand all
218 void MachBroker::RegisterNotifications() { 218 void MachBroker::RegisterNotifications() {
219 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED, 219 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
220 content::NotificationService::AllBrowserContextsAndSources()); 220 content::NotificationService::AllBrowserContextsAndSources());
221 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, 221 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
222 content::NotificationService::AllBrowserContextsAndSources()); 222 content::NotificationService::AllBrowserContextsAndSources());
223 registrar_.Add(this, content::NOTIFICATION_CHILD_PROCESS_CRASHED, 223 registrar_.Add(this, content::NOTIFICATION_CHILD_PROCESS_CRASHED,
224 content::NotificationService::AllBrowserContextsAndSources()); 224 content::NotificationService::AllBrowserContextsAndSources());
225 registrar_.Add(this, content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED, 225 registrar_.Add(this, content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED,
226 content::NotificationService::AllBrowserContextsAndSources()); 226 content::NotificationService::AllBrowserContextsAndSources());
227 } 227 }
OLDNEW
« no previous file with comments | « content/browser/browser_child_process_host.cc ('k') | content/browser/plugin_data_remover_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698