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

Unified Diff: content/network/network_service.h

Issue 2960843005: Revert of NetworkService: Destroy NetworkContexts on NetworkService teardown. (Closed)
Patch Set: Created 3 years, 6 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 | « content/network/network_context.cc ('k') | content/network/network_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/network/network_service.h
diff --git a/content/network/network_service.h b/content/network/network_service.h
index c945b9adb9b523a7a1ee4935668c24f9907b3cf2..e139546dd91e0850db7c5bdc7f54cfcbfd620ccb 100644
--- a/content/network/network_service.h
+++ b/content/network/network_service.h
@@ -8,15 +8,12 @@
#include <memory>
#include "base/macros.h"
-#include "content/common/content_export.h"
#include "content/common/network_service.mojom.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 content {
-
-class NetworkContext;
class NetworkService : public service_manager::Service,
public mojom::NetworkService {
@@ -25,22 +22,8 @@
std::unique_ptr<service_manager::BinderRegistry> registry);
~NetworkService() override;
- CONTENT_EXPORT static std::unique_ptr<NetworkService> CreateForTesting();
-
- // These are called by NetworkContexts as they are being created and
- // destroyed.
- void RegisterNetworkContext(NetworkContext* network_context);
- void DeregisterNetworkContext(NetworkContext* network_context);
-
- // mojom::NetworkService implementation:
- void CreateNetworkContext(mojom::NetworkContextRequest request,
- mojom::NetworkContextParamsPtr params) override;
-
private:
class MojoNetLog;
-
- // Used for tests.
- NetworkService();
// service_manager::Service implementation.
void OnBindInterface(const service_manager::BindSourceInfo& source_info,
@@ -50,17 +33,15 @@
void Create(const service_manager::BindSourceInfo& source_info,
mojom::NetworkServiceRequest request);
+ // mojom::NetworkService implementation:
+ void CreateNetworkContext(mojom::NetworkContextRequest request,
+ mojom::NetworkContextParamsPtr params) override;
+
std::unique_ptr<MojoNetLog> net_log_;
std::unique_ptr<service_manager::BinderRegistry> registry_;
mojo::Binding<mojom::NetworkService> binding_;
-
- // NetworkContexts register themselves with the NetworkService so that they
- // can be cleaned up when the NetworkService goes away. This is needed as
- // NetworkContexts share global state with the NetworkService, so must be
- // destroyed first.
- std::set<NetworkContext*> network_contexts_;
DISALLOW_COPY_AND_ASSIGN(NetworkService);
};
« no previous file with comments | « content/network/network_context.cc ('k') | content/network/network_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698