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

Side by Side Diff: chrome/browser/task_profiler/task_profiler_data_serializer.cc

Issue 1862513003: Remove NPAPI from browser and utility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/task_profiler/task_profiler_data_serializer.h" 5 #include "chrome/browser/task_profiler/task_profiler_data_serializer.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 int AsChromeProcessType( 78 int AsChromeProcessType(
79 metrics::ProfilerEventProto::TrackedObject::ProcessType process_type) { 79 metrics::ProfilerEventProto::TrackedObject::ProcessType process_type) {
80 switch (process_type) { 80 switch (process_type) {
81 case metrics::ProfilerEventProto::TrackedObject::UNKNOWN: 81 case metrics::ProfilerEventProto::TrackedObject::UNKNOWN:
82 return content::PROCESS_TYPE_UNKNOWN; 82 return content::PROCESS_TYPE_UNKNOWN;
83 case metrics::ProfilerEventProto::TrackedObject::BROWSER: 83 case metrics::ProfilerEventProto::TrackedObject::BROWSER:
84 return content::PROCESS_TYPE_BROWSER; 84 return content::PROCESS_TYPE_BROWSER;
85 case metrics::ProfilerEventProto::TrackedObject::RENDERER: 85 case metrics::ProfilerEventProto::TrackedObject::RENDERER:
86 return content::PROCESS_TYPE_RENDERER; 86 return content::PROCESS_TYPE_RENDERER;
87 case metrics::ProfilerEventProto::TrackedObject::PLUGIN:
88 return content::PROCESS_TYPE_PLUGIN;
89 case metrics::ProfilerEventProto::TrackedObject::WORKER: 87 case metrics::ProfilerEventProto::TrackedObject::WORKER:
90 return content::PROCESS_TYPE_WORKER_DEPRECATED; 88 return content::PROCESS_TYPE_WORKER_DEPRECATED;
91 case metrics::ProfilerEventProto::TrackedObject::NACL_LOADER: 89 case metrics::ProfilerEventProto::TrackedObject::NACL_LOADER:
92 return PROCESS_TYPE_NACL_LOADER; 90 return PROCESS_TYPE_NACL_LOADER;
93 case metrics::ProfilerEventProto::TrackedObject::UTILITY: 91 case metrics::ProfilerEventProto::TrackedObject::UTILITY:
94 return content::PROCESS_TYPE_UTILITY; 92 return content::PROCESS_TYPE_UTILITY;
95 case metrics::ProfilerEventProto::TrackedObject::PROFILE_IMPORT: 93 case metrics::ProfilerEventProto::TrackedObject::PROFILE_IMPORT:
96 return content::PROCESS_TYPE_UNKNOWN; 94 return content::PROCESS_TYPE_UNKNOWN;
97 case metrics::ProfilerEventProto::TrackedObject::ZYGOTE: 95 case metrics::ProfilerEventProto::TrackedObject::ZYGOTE:
98 return content::PROCESS_TYPE_ZYGOTE; 96 return content::PROCESS_TYPE_ZYGOTE;
(...skipping 29 matching lines...) Expand all
128 tasks_list->Append(snapshot.release()); 126 tasks_list->Append(snapshot.release());
129 } 127 }
130 dictionary->Set("list", tasks_list.release()); 128 dictionary->Set("list", tasks_list.release());
131 129
132 dictionary->SetInteger("process_id", process_id); 130 dictionary->SetInteger("process_id", process_id);
133 dictionary->SetString("process_type", content::GetProcessTypeNameInEnglish( 131 dictionary->SetString("process_type", content::GetProcessTypeNameInEnglish(
134 AsChromeProcessType(process_type))); 132 AsChromeProcessType(process_type)));
135 } 133 }
136 134
137 } // namespace task_profiler 135 } // namespace task_profiler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698