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

Unified Diff: content/browser/browser_context.cc

Issue 2451413003: Introduce Device Service (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/public/app/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index e506041e887442b37abb6b45ecd88b5f87415391..5205233af1d17f3a208860bc8b046e417fd3a1b3 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -39,6 +39,8 @@
#include "net/ssl/channel_id_store.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
+#include "services/device/device_service.h"
+#include "services/device/public/cpp/constants.h"
#include "services/file/file_service.h"
#include "services/file/public/cpp/constants.h"
#include "services/file/user_id_map.h"
@@ -457,6 +459,13 @@ void BrowserContext::Initialize(
connection->Start();
// New embedded service factories should be added to |connection| here.
+ // TODO(blundell): Does this belong as a global service rather than per
+ // BrowserContext?
+ ServiceInfo info;
+ info.factory =
+ base::Bind(&device::CreateDeviceService,
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE));
+ connection->AddEmbeddedService(device::kDeviceServiceName, info);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMojoLocalStorage)) {
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/public/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698