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

Unified Diff: content/network/network_service_impl.h

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 side-by-side diff with in-line comments
Download patch
Index: content/network/network_service_impl.h
diff --git a/content/network/network_service.h b/content/network/network_service_impl.h
similarity index 66%
rename from content/network/network_service.h
rename to content/network/network_service_impl.h
index 703ffc29b13515b57d8c43cb812b1303fd0cfd0c..39300084711b9190886befcdbc1e202e8decf29f 100644
--- a/content/network/network_service.h
+++ b/content/network/network_service_impl.h
@@ -2,30 +2,43 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_NETWORK_NETWORK_SERVICE_H_
-#define CONTENT_NETWORK_NETWORK_SERVICE_H_
+#ifndef CONTENT_NETWORK_NETWORK_SERVICE_IMPL_H_
+#define CONTENT_NETWORK_NETWORK_SERVICE_IMPL_H_
#include <memory>
#include "base/macros.h"
#include "content/common/content_export.h"
#include "content/public/common/network_service.mojom.h"
+#include "content/public/network/network_service.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "services/service_manager/public/cpp/binder_registry.h"
#include "services/service_manager/public/cpp/service.h"
+namespace net {
+class URLRequestContext;
+class URLRequestContextBuilder;
+} // namespace net
+
namespace content {
class NetworkContext;
-class NetworkService : public service_manager::Service,
- public mojom::NetworkService {
+class CONTENT_EXPORT NetworkServiceImpl : public service_manager::Service,
+ public NetworkService {
public:
- explicit NetworkService(
+ explicit NetworkServiceImpl(
std::unique_ptr<service_manager::BinderRegistry> registry);
- ~NetworkService() override;
- CONTENT_EXPORT static std::unique_ptr<NetworkService> CreateForTesting();
+ ~NetworkServiceImpl() override;
+
+ std::unique_ptr<mojom::NetworkContext> CreateNetworkContextWithBuilder(
+ content::mojom::NetworkContextRequest request,
+ content::mojom::NetworkContextParamsPtr params,
+ std::unique_ptr<net::URLRequestContextBuilder> builder,
+ net::URLRequestContext** url_request_context) override;
+
+ static std::unique_ptr<NetworkService> CreateForTesting();
// These are called by NetworkContexts as they are being created and
// destroyed.
@@ -37,10 +50,9 @@ class NetworkService : public service_manager::Service,
mojom::NetworkContextParamsPtr params) override;
private:
- class MojoNetLog;
+ friend class NetworkService;
jam 2017/07/08 01:30:08 why is this needed?
mmenke 2017/07/10 15:52:22 Removed. It's not, added it for a new private con
- // Used for tests.
- NetworkService();
+ class MojoNetLog;
// service_manager::Service implementation.
void OnBindInterface(const service_manager::BindSourceInfo& source_info,
@@ -62,9 +74,9 @@ class NetworkService : public service_manager::Service,
// destroyed first.
std::set<NetworkContext*> network_contexts_;
- DISALLOW_COPY_AND_ASSIGN(NetworkService);
+ DISALLOW_COPY_AND_ASSIGN(NetworkServiceImpl);
};
} // namespace content
-#endif // CONTENT_NETWORK_NETWORK_SERVICE_H_
+#endif // CONTENT_NETWORK_NETWORK_SERVICE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698