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

Unified Diff: mojo/services/network/url_loader_factory_impl.h

Issue 1161463004: Move URL Loader creation to a separate factory object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: mojo/services/network/url_loader_factory_impl.h
diff --git a/mojo/services/network/url_loader_factory_impl.h b/mojo/services/network/url_loader_factory_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..8980fd7f1d80c7fce8de1a134aae1b8f832b00ac
--- /dev/null
+++ b/mojo/services/network/url_loader_factory_impl.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
jam 2015/06/04 16:12:47 2015
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_SERVICES_NETWORK_URL_LOADER_FACTORY_IMPL_H_
+#define MOJO_SERVICES_NETWORK_URL_LOADER_FACTORY_IMPL_H_
+
+#include "base/compiler_specific.h"
+#include "mojo/application/public/cpp/app_lifetime_helper.h"
+#include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
+
+namespace mojo {
+class ApplicationConnection;
+class NetworkContext;
+
+class URLLoaderFactoryImpl : public URLLoaderFactory {
+ public:
+ URLLoaderFactoryImpl(ApplicationConnection* connection,
+ NetworkContext* context,
+ scoped_ptr<mojo::AppRefCount> app_refcount,
+ InterfaceRequest<URLLoaderFactory> request);
+ ~URLLoaderFactoryImpl() override;
+
+ // URLLoaderFactory methods:
+ void CreateURLLoader(InterfaceRequest<URLLoader> loader) override;
+
+ private:
+ NetworkContext* context_;
+ scoped_ptr<mojo::AppRefCount> app_refcount_;
+ StrongBinding<URLLoaderFactory> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryImpl);
+};
+
+} // namespace mojo
+
+#endif // MOJO_SERVICES_NETWORK_URL_LOADER_FACTORY_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698