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

Side by Side Diff: chrome/browser/extensions/chrome_mojo_service_registration.cc

Issue 1765143002: [Media Router] Add UMA histograms tracking component extension version/wakeups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move media_router_metrics_unittest to non_android Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/media/router/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/extensions/chrome_mojo_service_registration.h" 5 #include "chrome/browser/extensions/chrome_mojo_service_registration.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/public/browser/render_frame_host.h" 9 #include "content/public/browser/render_frame_host.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 15 matching lines...) Expand all
26 DCHECK(extension); 26 DCHECK(extension);
27 27
28 #if defined(ENABLE_MEDIA_ROUTER) 28 #if defined(ENABLE_MEDIA_ROUTER)
29 content::BrowserContext* context = 29 content::BrowserContext* context =
30 render_frame_host->GetProcess()->GetBrowserContext(); 30 render_frame_host->GetProcess()->GetBrowserContext();
31 if (media_router::MediaRouterEnabled(context)) { 31 if (media_router::MediaRouterEnabled(context)) {
32 if (extension->permissions_data()->HasAPIPermission( 32 if (extension->permissions_data()->HasAPIPermission(
33 APIPermission::kMediaRouterPrivate)) { 33 APIPermission::kMediaRouterPrivate)) {
34 render_frame_host->GetServiceRegistry()->AddService( 34 render_frame_host->GetServiceRegistry()->AddService(
35 base::Bind(media_router::MediaRouterMojoImpl::BindToRequest, 35 base::Bind(media_router::MediaRouterMojoImpl::BindToRequest,
36 extension->id(), context)); 36 extension, context));
37 } 37 }
38 } 38 }
39 #endif // defined(ENABLE_MEDIA_ROUTER) 39 #endif // defined(ENABLE_MEDIA_ROUTER)
40 } 40 }
41 41
42 } // namespace extensions 42 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/router/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698