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

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

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 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 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 14 matching lines...) Expand all
25 namespace task_manager { 25 namespace task_manager {
26 26
27 namespace { 27 namespace {
28 28
29 // Creates the Mojo service wrapper that will be used to sample the V8 memory 29 // Creates the Mojo service wrapper that will be used to sample the V8 memory
30 // usage and the the WebCache resource stats of the render process hosted by 30 // usage and the the WebCache resource stats of the render process hosted by
31 // |render_process_host|. 31 // |render_process_host|.
32 ProcessResourceUsage* CreateRendererResourcesSampler( 32 ProcessResourceUsage* CreateRendererResourcesSampler(
33 content::RenderProcessHost* render_process_host) { 33 content::RenderProcessHost* render_process_host) {
34 chrome::mojom::ResourceUsageReporterPtr service; 34 chrome::mojom::ResourceUsageReporterPtr service;
35 render_process_host->GetRemoteInterfaces()->GetInterface(&service); 35 BindInterface(render_process_host, &service);
36 return new ProcessResourceUsage(std::move(service)); 36 return new ProcessResourceUsage(std::move(service));
37 } 37 }
38 38
39 // Gets the profile name associated with the browser context of the given 39 // Gets the profile name associated with the browser context of the given
40 // |render_process_host| from the profile info cache. 40 // |render_process_host| from the profile info cache.
41 base::string16 GetRendererProfileName( 41 base::string16 GetRendererProfileName(
42 const content::RenderProcessHost* render_process_host) { 42 const content::RenderProcessHost* render_process_host) {
43 Profile* profile = 43 Profile* profile =
44 Profile::FromBrowserContext(render_process_host->GetBrowserContext()); 44 Profile::FromBrowserContext(render_process_host->GetBrowserContext());
45 return Task::GetProfileNameFromProfile(profile); 45 return Task::GetProfileNameFromProfile(profile);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (is_incognito) 235 if (is_incognito)
236 message_id = IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX; 236 message_id = IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX;
237 else 237 else
238 message_id = IDS_TASK_MANAGER_EXTENSION_PREFIX; 238 message_id = IDS_TASK_MANAGER_EXTENSION_PREFIX;
239 } 239 }
240 240
241 return l10n_util::GetStringFUTF16(message_id, title); 241 return l10n_util::GetStringFUTF16(message_id, title);
242 } 242 }
243 243
244 } // namespace task_manager 244 } // namespace task_manager
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/providers/child_process_task.cc ('k') | chrome/browser/ui/apps/chrome_app_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698