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

Side by Side Diff: content/public/browser/network_service_instance.cc

Issue 2968293002: Introduce SystemNetworkContextManager. (Closed)
Patch Set: Fix windows non-component build (??) Created 3 years, 5 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/public/browser/network_service_instance.h"
6
7 #include "base/feature_list.h"
8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/common/content_features.h"
10 #include "content/public/common/network_service.mojom.h"
11 #include "content/public/common/service_manager_connection.h"
12 #include "content/public/common/service_names.mojom.h"
13 #include "services/service_manager/public/cpp/connector.h"
14
15 namespace content {
16
17 mojom::NetworkService* GetNetworkService() {
18 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
19 DCHECK(base::FeatureList::IsEnabled(features::kNetworkService));
20
21 static mojom::NetworkServicePtr* g_network_service =
22 new mojom::NetworkServicePtr;
23 if (!g_network_service->is_bound()) {
24 ServiceManagerConnection::GetForProcess()->GetConnector()->BindInterface(
25 mojom::kNetworkServiceName, g_network_service);
26 }
27 return g_network_service->get();
28 }
29
30 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698