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

Side by Side Diff: chrome/browser/task_manager/providers/web_contents/renderer_task.cc

Issue 2988453002: Task manager tracking RenderProcessHosts processes (Closed)
Patch Set: fixed copy past cruft Created 3 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_manager/providers/web_contents/renderer_task.h" 5 #include "chrome/browser/task_manager/providers/web_contents/renderer_task.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 render_process_host_(render_process_host), 67 render_process_host_(render_process_host),
68 renderer_resources_sampler_( 68 renderer_resources_sampler_(
69 CreateRendererResourcesSampler(render_process_host_)), 69 CreateRendererResourcesSampler(render_process_host_)),
70 render_process_id_(render_process_host_->GetID()), 70 render_process_id_(render_process_host_->GetID()),
71 v8_memory_allocated_(0), 71 v8_memory_allocated_(0),
72 v8_memory_used_(0), 72 v8_memory_used_(0),
73 webcache_stats_(blink::WebCache::ResourceTypeStats()), 73 webcache_stats_(blink::WebCache::ResourceTypeStats()),
74 profile_name_(GetRendererProfileName(render_process_host_)), 74 profile_name_(GetRendererProfileName(render_process_host_)),
75 termination_status_(base::TERMINATION_STATUS_STILL_RUNNING), 75 termination_status_(base::TERMINATION_STATUS_STILL_RUNNING),
76 termination_error_code_(0) { 76 termination_error_code_(0) {
77 // All renderer tasks are capable of reporting network usage, so the default
78 // invalid value of -1 doesn't apply here.
79 OnNetworkBytesRead(0); 77 OnNetworkBytesRead(0);
80 78
81 // Tag the web_contents with a |ContentFaviconDriver| (if needed) so that 79 // Tag the web_contents with a |ContentFaviconDriver| (if needed) so that
82 // we can use it to observe favicons changes. 80 // we can use it to observe favicons changes.
83 favicon::CreateContentFaviconDriverForWebContents(web_contents); 81 favicon::CreateContentFaviconDriverForWebContents(web_contents);
84 favicon::ContentFaviconDriver::FromWebContents(web_contents)->AddObserver( 82 favicon::ContentFaviconDriver::FromWebContents(web_contents)->AddObserver(
85 this); 83 this);
86 } 84 }
87 85
88 RendererTask::~RendererTask() { 86 RendererTask::~RendererTask() {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (is_incognito) 233 if (is_incognito)
236 message_id = IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX; 234 message_id = IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX;
237 else 235 else
238 message_id = IDS_TASK_MANAGER_EXTENSION_PREFIX; 236 message_id = IDS_TASK_MANAGER_EXTENSION_PREFIX;
239 } 237 }
240 238
241 return l10n_util::GetStringFUTF16(message_id, title); 239 return l10n_util::GetStringFUTF16(message_id, title);
242 } 240 }
243 241
244 } // namespace task_manager 242 } // namespace task_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698