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

Unified Diff: chrome/browser/metrics/metrics_log.cc

Issue 12662019: Split the ProcessType enum into process types that content knows about (which will remain in src\co… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 9 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
Index: chrome/browser/metrics/metrics_log.cc
===================================================================
--- chrome/browser/metrics/metrics_log.cc (revision 189692)
+++ chrome/browser/metrics/metrics_log.cc (working copy)
@@ -32,6 +32,7 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/plugins/plugin_prefs.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/common/chrome_process_type.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/metrics/proto/omnibox_event.pb.h"
@@ -138,7 +139,7 @@
}
ProfilerEventProto::TrackedObject::ProcessType AsProtobufProcessType(
- content::ProcessType process_type) {
+ int process_type) {
switch (process_type) {
case content::PROCESS_TYPE_BROWSER:
return ProfilerEventProto::TrackedObject::BROWSER;
@@ -148,24 +149,24 @@
return ProfilerEventProto::TrackedObject::PLUGIN;
case content::PROCESS_TYPE_WORKER:
return ProfilerEventProto::TrackedObject::WORKER;
- case content::PROCESS_TYPE_NACL_LOADER:
- return ProfilerEventProto::TrackedObject::NACL_LOADER;
case content::PROCESS_TYPE_UTILITY:
return ProfilerEventProto::TrackedObject::UTILITY;
- case content::PROCESS_TYPE_PROFILE_IMPORT:
- return ProfilerEventProto::TrackedObject::PROFILE_IMPORT;
case content::PROCESS_TYPE_ZYGOTE:
return ProfilerEventProto::TrackedObject::ZYGOTE;
case content::PROCESS_TYPE_SANDBOX_HELPER:
return ProfilerEventProto::TrackedObject::SANDBOX_HELPER;
- case content::PROCESS_TYPE_NACL_BROKER:
- return ProfilerEventProto::TrackedObject::NACL_BROKER;
case content::PROCESS_TYPE_GPU:
return ProfilerEventProto::TrackedObject::GPU;
case content::PROCESS_TYPE_PPAPI_PLUGIN:
return ProfilerEventProto::TrackedObject::PPAPI_PLUGIN;
case content::PROCESS_TYPE_PPAPI_BROKER:
return ProfilerEventProto::TrackedObject::PPAPI_BROKER;
+ case PROCESS_TYPE_PROFILE_IMPORT:
+ return ProfilerEventProto::TrackedObject::PROFILE_IMPORT;
+ case PROCESS_TYPE_NACL_LOADER:
+ return ProfilerEventProto::TrackedObject::NACL_LOADER;
+ case PROCESS_TYPE_NACL_BROKER:
+ return ProfilerEventProto::TrackedObject::NACL_BROKER;
default:
NOTREACHED();
return ProfilerEventProto::TrackedObject::UNKNOWN;
@@ -213,7 +214,7 @@
}
void WriteProfilerData(const ProcessDataSnapshot& profiler_data,
- content::ProcessType process_type,
+ int process_type,
ProfilerEventProto* performance_profile) {
for (std::vector<tracked_objects::TaskSnapshot>::const_iterator it =
profiler_data.tasks.begin();
@@ -882,7 +883,7 @@
void MetricsLog::RecordProfilerData(
const tracked_objects::ProcessDataSnapshot& process_data,
- content::ProcessType process_type) {
+ int process_type) {
DCHECK(!locked());
if (tracked_objects::GetTimeSourceType() !=

Powered by Google App Engine
This is Rietveld 408576698