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

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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 DeathDataSnapshotToValue(snapshot.death_data, death_data.get()); 72 DeathDataSnapshotToValue(snapshot.death_data, death_data.get());
73 dictionary->Set("death_data", death_data.release()); 73 dictionary->Set("death_data", death_data.release());
74 74
75 dictionary->SetString("death_thread", snapshot.death_thread_name); 75 dictionary->SetString("death_thread", snapshot.death_thread_name);
76 } 76 }
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 case metrics::ProfilerEventProto::TrackedObject::PLUGIN:
82 return content::PROCESS_TYPE_UNKNOWN; 83 return content::PROCESS_TYPE_UNKNOWN;
83 case metrics::ProfilerEventProto::TrackedObject::BROWSER: 84 case metrics::ProfilerEventProto::TrackedObject::BROWSER:
84 return content::PROCESS_TYPE_BROWSER; 85 return content::PROCESS_TYPE_BROWSER;
85 case metrics::ProfilerEventProto::TrackedObject::RENDERER: 86 case metrics::ProfilerEventProto::TrackedObject::RENDERER:
86 return content::PROCESS_TYPE_RENDERER; 87 return content::PROCESS_TYPE_RENDERER;
87 case metrics::ProfilerEventProto::TrackedObject::PLUGIN:
88 return content::PROCESS_TYPE_PLUGIN;
89 case metrics::ProfilerEventProto::TrackedObject::WORKER: 88 case metrics::ProfilerEventProto::TrackedObject::WORKER:
90 return content::PROCESS_TYPE_WORKER_DEPRECATED; 89 return content::PROCESS_TYPE_WORKER_DEPRECATED;
91 case metrics::ProfilerEventProto::TrackedObject::NACL_LOADER: 90 case metrics::ProfilerEventProto::TrackedObject::NACL_LOADER:
92 return PROCESS_TYPE_NACL_LOADER; 91 return PROCESS_TYPE_NACL_LOADER;
93 case metrics::ProfilerEventProto::TrackedObject::UTILITY: 92 case metrics::ProfilerEventProto::TrackedObject::UTILITY:
94 return content::PROCESS_TYPE_UTILITY; 93 return content::PROCESS_TYPE_UTILITY;
95 case metrics::ProfilerEventProto::TrackedObject::PROFILE_IMPORT: 94 case metrics::ProfilerEventProto::TrackedObject::PROFILE_IMPORT:
96 return content::PROCESS_TYPE_UNKNOWN; 95 return content::PROCESS_TYPE_UNKNOWN;
97 case metrics::ProfilerEventProto::TrackedObject::ZYGOTE: 96 case metrics::ProfilerEventProto::TrackedObject::ZYGOTE:
98 return content::PROCESS_TYPE_ZYGOTE; 97 return content::PROCESS_TYPE_ZYGOTE;
(...skipping 29 matching lines...) Expand all
128 tasks_list->Append(snapshot.release()); 127 tasks_list->Append(snapshot.release());
129 } 128 }
130 dictionary->Set("list", tasks_list.release()); 129 dictionary->Set("list", tasks_list.release());
131 130
132 dictionary->SetInteger("process_id", process_id); 131 dictionary->SetInteger("process_id", process_id);
133 dictionary->SetString("process_type", content::GetProcessTypeNameInEnglish( 132 dictionary->SetString("process_type", content::GetProcessTypeNameInEnglish(
134 AsChromeProcessType(process_type))); 133 AsChromeProcessType(process_type)));
135 } 134 }
136 135
137 } // namespace task_profiler 136 } // namespace task_profiler
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/child_process_resource_provider.cc ('k') | chrome/browser/ui/webui/plugins/plugins_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698