summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/browser_child_process_host_impl.cc27
-rw-r--r--content/browser/browser_child_process_host_impl.h2
-rw-r--r--content/browser/histogram_controller.cc3
-rw-r--r--content/browser/loader/resource_dispatcher_host_impl.cc4
-rw-r--r--content/browser/loader/resource_dispatcher_host_unittest.cc1
-rw-r--r--content/browser/loader/resource_loader.cc1
-rw-r--r--content/browser/loader/resource_message_filter.cc2
-rw-r--r--content/browser/loader/resource_message_filter.h7
-rw-r--r--content/browser/loader/resource_request_info_impl.cc2
-rw-r--r--content/browser/loader/resource_request_info_impl.h9
-rw-r--r--content/browser/plugin_process_host.h1
-rw-r--r--content/browser/profiler_controller_impl.cc2
-rw-r--r--content/browser/profiler_controller_impl.h2
-rw-r--r--content/browser/profiler_message_filter.cc2
-rw-r--r--content/browser/profiler_message_filter.h5
-rw-r--r--content/browser/tcmalloc_internals_request_job.cc2
-rw-r--r--content/browser/tcmalloc_internals_request_job.h3
-rw-r--r--content/browser/worker_host/worker_process_host.h1
18 files changed, 38 insertions, 38 deletions
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 606ca74..7979c36 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -28,6 +28,7 @@
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/process_type.h"
#include "content/public/common/result_codes.h"
#if defined(OS_MACOSX)
@@ -61,9 +62,9 @@ void NotifyProcessCrashed(const ChildProcessData& data) {
} // namespace
BrowserChildProcessHost* BrowserChildProcessHost::Create(
- ProcessType type,
+ int process_type,
BrowserChildProcessHostDelegate* delegate) {
- return new BrowserChildProcessHostImpl(type, delegate);
+ return new BrowserChildProcessHostImpl(process_type, delegate);
}
#if defined(OS_MACOSX)
@@ -93,15 +94,15 @@ void BrowserChildProcessHostImpl::RemoveObserver(
}
BrowserChildProcessHostImpl::BrowserChildProcessHostImpl(
- ProcessType type,
+ int process_type,
BrowserChildProcessHostDelegate* delegate)
- : data_(type),
+ : data_(process_type),
delegate_(delegate) {
data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId();
child_process_host_.reset(ChildProcessHost::Create(this));
child_process_host_->AddFilter(new TraceMessageFilter);
- child_process_host_->AddFilter(new ProfilerMessageFilter(type));
+ child_process_host_->AddFilter(new ProfilerMessageFilter(process_type));
child_process_host_->AddFilter(new HistogramMessageFilter());
g_child_process_list.Get().push_back(this);
@@ -265,29 +266,29 @@ void BrowserChildProcessHostImpl::OnChildDisconnected() {
delegate_->OnProcessCrashed(exit_code);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&NotifyProcessCrashed, data_));
- UMA_HISTOGRAM_ENUMERATION("ChildProcess.Crashed",
- data_.type,
+ UMA_HISTOGRAM_ENUMERATION("ChildProcess.Crashed2",
+ data_.process_type,
PROCESS_TYPE_MAX);
break;
}
case base::TERMINATION_STATUS_PROCESS_WAS_KILLED: {
delegate_->OnProcessCrashed(exit_code);
// Report that this child process was killed.
- UMA_HISTOGRAM_ENUMERATION("ChildProcess.Killed",
- data_.type,
+ UMA_HISTOGRAM_ENUMERATION("ChildProcess.Killed2",
+ data_.process_type,
PROCESS_TYPE_MAX);
break;
}
case base::TERMINATION_STATUS_STILL_RUNNING: {
- UMA_HISTOGRAM_ENUMERATION("ChildProcess.DisconnectedAlive",
- data_.type,
+ UMA_HISTOGRAM_ENUMERATION("ChildProcess.DisconnectedAlive2",
+ data_.process_type,
PROCESS_TYPE_MAX);
}
default:
break;
}
- UMA_HISTOGRAM_ENUMERATION("ChildProcess.Disconnected",
- data_.type,
+ UMA_HISTOGRAM_ENUMERATION("ChildProcess.Disconnected2",
+ data_.process_type,
PROCESS_TYPE_MAX);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&NotifyProcessHostDisconnected, data_));
diff --git a/content/browser/browser_child_process_host_impl.h b/content/browser/browser_child_process_host_impl.h
index 0f5cc5c..e3fdcb5 100644
--- a/content/browser/browser_child_process_host_impl.h
+++ b/content/browser/browser_child_process_host_impl.h
@@ -30,7 +30,7 @@ class CONTENT_EXPORT BrowserChildProcessHostImpl
public ChildProcessLauncher::Client {
public:
BrowserChildProcessHostImpl(
- ProcessType type,
+ int process_type,
BrowserChildProcessHostDelegate* delegate);
virtual ~BrowserChildProcessHostImpl();
diff --git a/content/browser/histogram_controller.cc b/content/browser/histogram_controller.cc
index 228e67f..54f760b 100644
--- a/content/browser/histogram_controller.cc
+++ b/content/browser/histogram_controller.cc
@@ -12,6 +12,7 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/common/process_type.h"
namespace content {
@@ -71,7 +72,7 @@ void HistogramController::GetHistogramDataFromChildProcesses(
int pending_processes = 0;
for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) {
- ProcessType type = iter.GetData().type;
+ int type = iter.GetData().process_type;
if (type != PROCESS_TYPE_PLUGIN && type != PROCESS_TYPE_GPU)
continue;
++pending_processes;
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index 4c4f86c..d953bd4 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -160,7 +160,7 @@ GURL MaybeStripReferrer(const GURL& possible_referrer) {
// ResourceDispatcherHostImpl should service this request. A request might be
// disallowed if the renderer is not authorized to retrieve the request URL or
// if the renderer is attempting to upload an unauthorized file.
-bool ShouldServiceRequest(ProcessType process_type,
+bool ShouldServiceRequest(int process_type,
int child_id,
const ResourceHostMsg_Request& request_data) {
if (process_type == PROCESS_TYPE_PLUGIN)
@@ -877,7 +877,7 @@ void ResourceDispatcherHostImpl::BeginRequest(
const ResourceHostMsg_Request& request_data,
IPC::Message* sync_result, // only valid for sync
int route_id) {
- ProcessType process_type = filter_->process_type();
+ int process_type = filter_->process_type();
int child_id = filter_->child_id();
// If we crash here, figure out what URL the renderer was requesting.
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc
index 139b416..329c939 100644
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc
@@ -23,6 +23,7 @@
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "content/public/browser/resource_throttle.h"
+#include "content/public/common/process_type.h"
#include "content/public/common/resource_response.h"
#include "content/public/test/test_browser_context.h"
#include "content/test/test_content_browser_client.h"
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index 91e07a5..a88aa05 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -19,6 +19,7 @@
#include "content/public/browser/site_instance.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/process_type.h"
#include "content/public/common/resource_response.h"
#include "content/public/common/url_constants.h"
#include "net/base/load_flags.h"
diff --git a/content/browser/loader/resource_message_filter.cc b/content/browser/loader/resource_message_filter.cc
index 6f7c97c..47e86d5 100644
--- a/content/browser/loader/resource_message_filter.cc
+++ b/content/browser/loader/resource_message_filter.cc
@@ -14,7 +14,7 @@ namespace content {
ResourceMessageFilter::ResourceMessageFilter(
int child_id,
- ProcessType process_type,
+ int process_type,
ResourceContext* resource_context,
ChromeAppCacheService* appcache_service,
ChromeBlobStorageContext* blob_storage_context,
diff --git a/content/browser/loader/resource_message_filter.h b/content/browser/loader/resource_message_filter.h
index c7dd258..eb7d0f9 100644
--- a/content/browser/loader/resource_message_filter.h
+++ b/content/browser/loader/resource_message_filter.h
@@ -8,7 +8,6 @@
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "content/public/browser/browser_message_filter.h"
-#include "content/public/common/process_type.h"
#include "webkit/glue/resource_type.h"
namespace fileapi {
@@ -47,7 +46,7 @@ class CONTENT_EXPORT ResourceMessageFilter : public BrowserMessageFilter {
ResourceMessageFilter(
int child_id,
- ProcessType process_type,
+ int process_type,
ResourceContext* resource_context,
ChromeAppCacheService* appcache_service,
ChromeBlobStorageContext* blob_storage_context,
@@ -80,7 +79,7 @@ class CONTENT_EXPORT ResourceMessageFilter : public BrowserMessageFilter {
ResourceType::Type request_type);
int child_id() const { return child_id_; }
- ProcessType process_type() const { return process_type_; }
+ int process_type() const { return process_type_; }
protected:
// Protected destructor so that we can be overriden in tests.
@@ -90,7 +89,7 @@ class CONTENT_EXPORT ResourceMessageFilter : public BrowserMessageFilter {
// The ID of the child process.
int child_id_;
- ProcessType process_type_;
+ int process_type_;
// Owned by ProfileIOData* which is guaranteed to outlive us.
ResourceContext* resource_context_;
diff --git a/content/browser/loader/resource_request_info_impl.cc b/content/browser/loader/resource_request_info_impl.cc
index 98f346d..8039a12 100644
--- a/content/browser/loader/resource_request_info_impl.cc
+++ b/content/browser/loader/resource_request_info_impl.cc
@@ -81,7 +81,7 @@ const ResourceRequestInfoImpl* ResourceRequestInfoImpl::ForRequest(
}
ResourceRequestInfoImpl::ResourceRequestInfoImpl(
- ProcessType process_type,
+ int process_type,
int child_id,
int route_id,
int origin_pid,
diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h
index bf0c6b9..f558203 100644
--- a/content/browser/loader/resource_request_info_impl.h
+++ b/content/browser/loader/resource_request_info_impl.h
@@ -12,7 +12,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/supports_user_data.h"
#include "content/public/browser/resource_request_info.h"
-#include "content/public/common/process_type.h"
#include "content/public/common/referrer.h"
#include "net/base/load_states.h"
#include "webkit/glue/resource_type.h"
@@ -40,7 +39,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
const net::URLRequest* request);
CONTENT_EXPORT ResourceRequestInfoImpl(
- ProcessType process_type,
+ int process_type,
int child_id,
int route_id,
int origin_pid,
@@ -93,9 +92,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
}
// Identifies the type of process (renderer, plugin, etc.) making the request.
- ProcessType process_type() const {
- return process_type_;
- }
+ int process_type() const { return process_type_; }
// Downloads are allowed only as a top level request.
bool allow_download() const { return allow_download_; }
@@ -128,7 +125,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo,
// Non-owning, may be NULL.
CrossSiteResourceHandler* cross_site_handler_;
- ProcessType process_type_;
+ int process_type_;
int child_id_;
int route_id_;
int origin_pid_;
diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h
index 3795df3..63696ef 100644
--- a/content/browser/plugin_process_host.h
+++ b/content/browser/plugin_process_host.h
@@ -18,6 +18,7 @@
#include "content/common/content_export.h"
#include "content/public/browser/browser_child_process_host_delegate.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
+#include "content/public/common/process_type.h"
#include "ipc/ipc_channel_proxy.h"
#include "webkit/plugins/webplugininfo.h"
#include "ui/gfx/native_widget_types.h"
diff --git a/content/browser/profiler_controller_impl.cc b/content/browser/profiler_controller_impl.cc
index fcf61ea..00088ce 100644
--- a/content/browser/profiler_controller_impl.cc
+++ b/content/browser/profiler_controller_impl.cc
@@ -40,7 +40,7 @@ void ProfilerControllerImpl::OnPendingProcesses(int sequence_number,
void ProfilerControllerImpl::OnProfilerDataCollected(
int sequence_number,
const tracked_objects::ProcessDataSnapshot& profiler_data,
- ProcessType process_type) {
+ int process_type) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
diff --git a/content/browser/profiler_controller_impl.h b/content/browser/profiler_controller_impl.h
index efce32a..1efbafa 100644
--- a/content/browser/profiler_controller_impl.h
+++ b/content/browser/profiler_controller_impl.h
@@ -39,7 +39,7 @@ class ProfilerControllerImpl : public ProfilerController {
void OnProfilerDataCollected(
int sequence_number,
const tracked_objects::ProcessDataSnapshot& profiler_data,
- ProcessType process_type);
+ int process_type);
// ProfilerController implementation:
virtual void Register(ProfilerSubscriber* subscriber) OVERRIDE;
diff --git a/content/browser/profiler_message_filter.cc b/content/browser/profiler_message_filter.cc
index d1d3e8f..217a2f4 100644
--- a/content/browser/profiler_message_filter.cc
+++ b/content/browser/profiler_message_filter.cc
@@ -12,7 +12,7 @@
namespace content {
-ProfilerMessageFilter::ProfilerMessageFilter(ProcessType process_type)
+ProfilerMessageFilter::ProfilerMessageFilter(int process_type)
: process_type_(process_type) {
}
diff --git a/content/browser/profiler_message_filter.h b/content/browser/profiler_message_filter.h
index 99d7327..bbac0ba 100644
--- a/content/browser/profiler_message_filter.h
+++ b/content/browser/profiler_message_filter.h
@@ -8,7 +8,6 @@
#include <string>
#include "content/public/browser/browser_message_filter.h"
-#include "content/public/common/process_type.h"
namespace tracked_objects {
struct ProcessDataSnapshot;
@@ -19,7 +18,7 @@ namespace content {
// This class sends and receives profiler messages in the browser process.
class ProfilerMessageFilter : public BrowserMessageFilter {
public:
- explicit ProfilerMessageFilter(ProcessType process_type);
+ explicit ProfilerMessageFilter(int process_type);
// BrowserMessageFilter implementation.
virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
@@ -41,7 +40,7 @@ class ProfilerMessageFilter : public BrowserMessageFilter {
void OnTcmallocStats(const std::string& output);
#endif
- ProcessType process_type_;
+ int process_type_;
DISALLOW_COPY_AND_ASSIGN(ProfilerMessageFilter);
};
diff --git a/content/browser/tcmalloc_internals_request_job.cc b/content/browser/tcmalloc_internals_request_job.cc
index 87975b4..b155b2f 100644
--- a/content/browser/tcmalloc_internals_request_job.cc
+++ b/content/browser/tcmalloc_internals_request_job.cc
@@ -24,7 +24,7 @@ AboutTcmallocOutputs::AboutTcmallocOutputs() {}
AboutTcmallocOutputs::~AboutTcmallocOutputs() {}
void AboutTcmallocOutputs::OnStatsForChildProcess(
- base::ProcessId pid, ProcessType process_type,
+ base::ProcessId pid, int process_type,
const std::string& output) {
std::string header = GetProcessTypeNameInEnglish(process_type);
base::StringAppendF(&header, " PID %d", static_cast<int>(pid));
diff --git a/content/browser/tcmalloc_internals_request_job.h b/content/browser/tcmalloc_internals_request_job.h
index d74b656..03912d1 100644
--- a/content/browser/tcmalloc_internals_request_job.h
+++ b/content/browser/tcmalloc_internals_request_job.h
@@ -10,7 +10,6 @@
#include "base/memory/singleton.h"
#include "base/process.h"
#include "build/build_config.h" // USE_TCMALLOC
-#include "content/public/common/process_type.h"
#include "net/url_request/url_request_simple_job.h"
namespace content {
@@ -29,7 +28,7 @@ class AboutTcmallocOutputs {
// the output for a canonical process-specific header string that
// incorporates the pid.
void OnStatsForChildProcess(base::ProcessId pid,
- ProcessType process_type,
+ int process_type,
const std::string& output);
private:
diff --git a/content/browser/worker_host/worker_process_host.h b/content/browser/worker_host/worker_process_host.h
index 147348d..dd1d58f 100644
--- a/content/browser/worker_host/worker_process_host.h
+++ b/content/browser/worker_host/worker_process_host.h
@@ -17,6 +17,7 @@
#include "content/common/content_export.h"
#include "content/public/browser/browser_child_process_host_delegate.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
+#include "content/public/common/process_type.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_sender.h"