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

Unified Diff: content/browser/browser_child_process_host_impl.cc

Issue 11235068: Move the remaning files in content\common to the content namespace. (Closed) Base URL: svn://chrome-svn/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/browser_child_process_host_impl.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_child_process_host_impl.cc
===================================================================
--- content/browser/browser_child_process_host_impl.cc (revision 163632)
+++ content/browser/browser_child_process_host_impl.cc (working copy)
@@ -34,12 +34,7 @@
#include "content/browser/mach_broker_mac.h"
#endif
-using content::BrowserChildProcessHostDelegate;
-using content::BrowserThread;
-using content::ChildProcessData;
-using content::ChildProcessHost;
-using content::ChildProcessHostImpl;
-
+namespace content {
namespace {
static base::LazyInstance<BrowserChildProcessHostImpl::BrowserChildProcessList>
@@ -49,15 +44,13 @@
// UI thread.
void ChildNotificationHelper(int notification_type,
const ChildProcessData& data) {
- content::NotificationService::current()->
- Notify(notification_type, content::NotificationService::AllSources(),
- content::Details<const ChildProcessData>(&data));
+ NotificationService::current()->Notify(
+ notification_type, NotificationService::AllSources(),
+ Details<const ChildProcessData>(&data));
}
} // namespace
-namespace content {
-
BrowserChildProcessHost* BrowserChildProcessHost::Create(
ProcessType type,
BrowserChildProcessHostDelegate* delegate) {
@@ -70,15 +63,13 @@
}
#endif
-} // namespace content
-
BrowserChildProcessHostImpl::BrowserChildProcessList*
BrowserChildProcessHostImpl::GetIterator() {
return g_child_process_list.Pointer();
}
BrowserChildProcessHostImpl::BrowserChildProcessHostImpl(
- content::ProcessType type,
+ ProcessType type,
BrowserChildProcessHostDelegate* delegate)
: data_(type),
delegate_(delegate) {
@@ -86,11 +77,11 @@
child_process_host_.reset(ChildProcessHost::Create(this));
child_process_host_->AddFilter(new TraceMessageFilter);
- child_process_host_->AddFilter(new content::ProfilerMessageFilter(type));
- child_process_host_->AddFilter(new content::HistogramMessageFilter());
+ child_process_host_->AddFilter(new ProfilerMessageFilter(type));
+ child_process_host_->AddFilter(new HistogramMessageFilter());
g_child_process_list.Get().push_back(this);
- content::GetContentClient()->browser()->BrowserChildProcessHostCreated(this);
+ GetContentClient()->browser()->BrowserChildProcessHostCreated(this);
}
BrowserChildProcessHostImpl::~BrowserChildProcessHostImpl() {
@@ -119,7 +110,7 @@
CommandLine* cmd_line) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- content::GetContentClient()->browser()->AppendExtraCommandLineSwitches(
+ GetContentClient()->browser()->AppendExtraCommandLineSwitches(
cmd_line, data_.id);
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
@@ -211,7 +202,7 @@
}
void BrowserChildProcessHostImpl::OnChannelConnected(int32 peer_pid) {
- Notify(content::NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED);
+ Notify(NOTIFICATION_CHILD_PROCESS_HOST_CONNECTED);
delegate_->OnChannelConnected(peer_pid);
}
@@ -232,10 +223,10 @@
case base::TERMINATION_STATUS_ABNORMAL_TERMINATION: {
delegate_->OnProcessCrashed(exit_code);
// Report that this child process crashed.
- Notify(content::NOTIFICATION_CHILD_PROCESS_CRASHED);
+ Notify(NOTIFICATION_CHILD_PROCESS_CRASHED);
UMA_HISTOGRAM_ENUMERATION("ChildProcess.Crashed",
data_.type,
- content::PROCESS_TYPE_MAX);
+ PROCESS_TYPE_MAX);
break;
}
case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: {
@@ -243,22 +234,22 @@
// Report that this child process was killed.
UMA_HISTOGRAM_ENUMERATION("ChildProcess.Killed",
data_.type,
- content::PROCESS_TYPE_MAX);
+ PROCESS_TYPE_MAX);
break;
}
case base::TERMINATION_STATUS_STILL_RUNNING: {
UMA_HISTOGRAM_ENUMERATION("ChildProcess.DisconnectedAlive",
data_.type,
- content::PROCESS_TYPE_MAX);
+ PROCESS_TYPE_MAX);
}
default:
break;
}
UMA_HISTOGRAM_ENUMERATION("ChildProcess.Disconnected",
data_.type,
- content::PROCESS_TYPE_MAX);
+ PROCESS_TYPE_MAX);
// Notify in the main loop of the disconnection.
- Notify(content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED);
+ Notify(NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED);
delete delegate_; // Will delete us
}
@@ -274,3 +265,5 @@
data_.handle = child_process_->GetHandle();
delegate_->OnProcessLaunched();
}
+
+} // namespace content
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698