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

Unified Diff: content/browser/mach_broker_mac.cc

Issue 11273049: Revert 164120 - content/browser: Move more files into the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/host_zoom_map_impl_unittest.cc ('k') | content/browser/mach_broker_mac_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/browser/host_zoom_map_impl_unittest.cc ('k') | content/browser/mach_broker_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698