Index: content/browser/mach_broker_mac.cc |
=================================================================== |
--- content/browser/mach_broker_mac.cc (revision 164121) |
+++ content/browser/mach_broker_mac.cc (working copy) |
@@ -21,15 +21,13 @@ |
#include "content/public/browser/notification_types.h" |
#include "content/public/common/content_switches.h" |
-namespace content { |
+using content::BrowserThread; |
namespace { |
- |
// Prints a string representation of a Mach error code. |
std::string MachErrorCode(kern_return_t err) { |
return base::StringPrintf("0x%x %s", err, mach_error_string(err)); |
} |
- |
} // namespace |
class MachListenerThreadDelegate : public base::PlatformThread::Delegate { |
@@ -175,24 +173,25 @@ |
} |
void MachBroker::Observe(int type, |
- const NotificationSource& source, |
- const NotificationDetails& details) { |
+ const content::NotificationSource& source, |
+ const content::NotificationDetails& details) { |
// TODO(rohitrao): These notifications do not always carry the proper PIDs, |
// especially when the renderer is already gone or has crashed. Find a better |
// way to listen for child process deaths. http://crbug.com/55734 |
base::ProcessHandle handle = 0; |
switch (type) { |
- case NOTIFICATION_RENDERER_PROCESS_CLOSED: |
+ case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: |
handle = |
- Details<RenderProcessHost::RendererClosedDetails>( |
+ content::Details<content::RenderProcessHost::RendererClosedDetails>( |
details)->handle; |
break; |
- case NOTIFICATION_RENDERER_PROCESS_TERMINATED: |
- handle = Source<RenderProcessHost>(source)->GetHandle(); |
+ case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: |
+ handle = content::Source<content::RenderProcessHost>(source)-> |
+ GetHandle(); |
break; |
- case NOTIFICATION_CHILD_PROCESS_CRASHED: |
- case NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED: |
- handle = Details<ChildProcessData>(details)->handle; |
+ case content::NOTIFICATION_CHILD_PROCESS_CRASHED: |
+ case content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED: |
+ handle = content::Details<content::ChildProcessData>(details)->handle; |
break; |
default: |
NOTREACHED() << "Unexpected notification"; |
@@ -217,14 +216,12 @@ |
MachBroker::~MachBroker() {} |
void MachBroker::RegisterNotifications() { |
- registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_CLOSED, |
- NotificationService::AllBrowserContextsAndSources()); |
- registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
- NotificationService::AllBrowserContextsAndSources()); |
- registrar_.Add(this, NOTIFICATION_CHILD_PROCESS_CRASHED, |
- NotificationService::AllBrowserContextsAndSources()); |
- registrar_.Add(this, NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED, |
- NotificationService::AllBrowserContextsAndSources()); |
+ registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CLOSED, |
+ content::NotificationService::AllBrowserContextsAndSources()); |
+ registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, |
+ content::NotificationService::AllBrowserContextsAndSources()); |
+ registrar_.Add(this, content::NOTIFICATION_CHILD_PROCESS_CRASHED, |
+ content::NotificationService::AllBrowserContextsAndSources()); |
+ registrar_.Add(this, content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED, |
+ content::NotificationService::AllBrowserContextsAndSources()); |
} |
- |
-} // namespace content |