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

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

Issue 1067733006: Add extra parameter to BrowserChildProcessCrashed to pass the exit_code at time of crash/termination (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review comments Created 5 years, 7 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
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 <bsm/libbsm.h> 7 #include <bsm/libbsm.h>
8 #include <servers/bootstrap.h> 8 #include <servers/bootstrap.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (it == mach_map_.end()) 210 if (it == mach_map_.end())
211 return MACH_PORT_NULL; 211 return MACH_PORT_NULL;
212 return it->second; 212 return it->second;
213 } 213 }
214 214
215 void MachBroker::BrowserChildProcessHostDisconnected( 215 void MachBroker::BrowserChildProcessHostDisconnected(
216 const ChildProcessData& data) { 216 const ChildProcessData& data) {
217 InvalidateChildProcessId(data.id); 217 InvalidateChildProcessId(data.id);
218 } 218 }
219 219
220 void MachBroker::BrowserChildProcessCrashed(const ChildProcessData& data) { 220 void MachBroker::BrowserChildProcessCrashed(const ChildProcessData& data,
221 int exit_code) {
221 InvalidateChildProcessId(data.id); 222 InvalidateChildProcessId(data.id);
222 } 223 }
223 224
224 void MachBroker::Observe(int type, 225 void MachBroker::Observe(int type,
225 const NotificationSource& source, 226 const NotificationSource& source,
226 const NotificationDetails& details) { 227 const NotificationDetails& details) {
227 switch (type) { 228 switch (type) {
228 case NOTIFICATION_RENDERER_PROCESS_TERMINATED: 229 case NOTIFICATION_RENDERER_PROCESS_TERMINATED:
229 case NOTIFICATION_RENDERER_PROCESS_CLOSED: { 230 case NOTIFICATION_RENDERER_PROCESS_CLOSED: {
230 RenderProcessHost* host = Source<RenderProcessHost>(source).ptr(); 231 RenderProcessHost* host = Source<RenderProcessHost>(source).ptr();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 NotificationService::AllBrowserContextsAndSources()); 292 NotificationService::AllBrowserContextsAndSources());
292 registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED, 293 registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED,
293 NotificationService::AllBrowserContextsAndSources()); 294 NotificationService::AllBrowserContextsAndSources());
294 295
295 // No corresponding StopObservingBrowserChildProcesses, 296 // No corresponding StopObservingBrowserChildProcesses,
296 // we leak this singleton. 297 // we leak this singleton.
297 BrowserChildProcessObserver::Add(this); 298 BrowserChildProcessObserver::Add(this);
298 } 299 }
299 300
300 } // namespace content 301 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/mach_broker_mac.h ('k') | content/public/browser/browser_child_process_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698