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

Unified Diff: content/browser/browser_context.cc

Issue 2804373002: Eliminate Connector::Connect(), Connection, etc. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/font_service/font_service_app.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('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 638e0ecc2ff862914320523ccebf325b8decfda3..b7a99d57813eadc0f76a539635140e6ba15cb509 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -42,7 +42,6 @@
#include "services/file/file_service.h"
#include "services/file/public/interfaces/constants.mojom.h"
#include "services/file/user_id_map.h"
-#include "services/service_manager/public/cpp/connection.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/interfaces/service.mojom.h"
#include "storage/browser/database/database_tracker.h"
@@ -150,11 +149,9 @@ void SetDownloadManager(BrowserContext* context,
class BrowserContextServiceManagerConnectionHolder
: public base::SupportsUserData::Data {
public:
- BrowserContextServiceManagerConnectionHolder(
- std::unique_ptr<service_manager::Connection> connection,
+ explicit BrowserContextServiceManagerConnectionHolder(
service_manager::mojom::ServiceRequest request)
- : root_connection_(std::move(connection)),
- service_manager_connection_(ServiceManagerConnection::Create(
+ : service_manager_connection_(ServiceManagerConnection::Create(
std::move(request),
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))) {}
~BrowserContextServiceManagerConnectionHolder() override {}
@@ -164,7 +161,6 @@ class BrowserContextServiceManagerConnectionHolder
}
private:
- std::unique_ptr<service_manager::Connection> root_connection_;
std::unique_ptr<ServiceManagerConnection> service_manager_connection_;
DISALLOW_COPY_AND_ASSIGN(BrowserContextServiceManagerConnectionHolder);
@@ -442,9 +438,9 @@ void BrowserContext::Initialize(
identity, std::move(service), mojo::MakeRequest(&pid_receiver));
pid_receiver->SetPID(base::GetCurrentProcId());
+ service_manager_connection->GetConnector()->StartService(identity);
BrowserContextServiceManagerConnectionHolder* connection_holder =
new BrowserContextServiceManagerConnectionHolder(
- service_manager_connection->GetConnector()->Connect(identity),
std::move(service_request));
browser_context->SetUserData(kServiceManagerConnection, connection_holder);
« no previous file with comments | « components/font_service/font_service_app.cc ('k') | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698