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

Side by Side Diff: mojo/services/network/url_loader_impl.h

Issue 380413003: Mojo: Use InterfaceFactory<Interface> for service registration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix network_service_loader Created 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/services/network/main.cc ('k') | mojo/services/network/url_loader_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_SERVICES_NETWORK_URL_LOADER_IMPL_H_ 5 #ifndef MOJO_SERVICES_NETWORK_URL_LOADER_IMPL_H_
6 #define MOJO_SERVICES_NETWORK_URL_LOADER_IMPL_H_ 6 #define MOJO_SERVICES_NETWORK_URL_LOADER_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "mojo/common/handle_watcher.h" 11 #include "mojo/common/handle_watcher.h"
12 #include "mojo/public/cpp/bindings/interface_impl.h" 12 #include "mojo/public/cpp/bindings/interface_impl.h"
13 #include "mojo/services/public/interfaces/network/url_loader.mojom.h" 13 #include "mojo/services/public/interfaces/network/url_loader.mojom.h"
14 #include "net/base/net_errors.h" 14 #include "net/base/net_errors.h"
15 #include "net/url_request/url_request.h" 15 #include "net/url_request/url_request.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 class NetworkContext; 18 class NetworkContext;
19 19
20 class URLLoaderImpl : public InterfaceImpl<URLLoader>, 20 class URLLoaderImpl : public InterfaceImpl<URLLoader>,
21 public net::URLRequest::Delegate { 21 public net::URLRequest::Delegate {
22 public: 22 public:
23 explicit URLLoaderImpl(NetworkContext* context); 23 explicit URLLoaderImpl(NetworkContext* context);
24 virtual ~URLLoaderImpl(); 24 virtual ~URLLoaderImpl();
25 25
26 private: 26 private:
27 class PendingWriteToDataPipe; 27 class PendingWriteToDataPipe;
28 class DependentIOBuffer; 28 class DependentIOBuffer;
29 29
30 // InterfaceImpl<> methods:
31 virtual void OnConnectionError() OVERRIDE;
32
33 // URLLoader methods: 30 // URLLoader methods:
34 virtual void Start( 31 virtual void Start(
35 URLRequestPtr request, 32 URLRequestPtr request,
36 const Callback<void(URLResponsePtr)>& callback) OVERRIDE; 33 const Callback<void(URLResponsePtr)>& callback) OVERRIDE;
37 virtual void FollowRedirect( 34 virtual void FollowRedirect(
38 const Callback<void(URLResponsePtr)>& callback) OVERRIDE; 35 const Callback<void(URLResponsePtr)>& callback) OVERRIDE;
39 virtual void QueryStatus( 36 virtual void QueryStatus(
40 const Callback<void(URLLoaderStatusPtr)>& callback) OVERRIDE; 37 const Callback<void(URLLoaderStatusPtr)>& callback) OVERRIDE;
41 38
42 // net::URLRequest::Delegate methods: 39 // net::URLRequest::Delegate methods:
(...skipping 21 matching lines...) Expand all
64 common::HandleWatcher handle_watcher_; 61 common::HandleWatcher handle_watcher_;
65 uint32 response_body_buffer_size_; 62 uint32 response_body_buffer_size_;
66 bool auto_follow_redirects_; 63 bool auto_follow_redirects_;
67 64
68 base::WeakPtrFactory<URLLoaderImpl> weak_ptr_factory_; 65 base::WeakPtrFactory<URLLoaderImpl> weak_ptr_factory_;
69 }; 66 };
70 67
71 } // namespace mojo 68 } // namespace mojo
72 69
73 #endif // MOJO_SERVICES_NETWORK_URL_LOADER_IMPL_H_ 70 #endif // MOJO_SERVICES_NETWORK_URL_LOADER_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/network/main.cc ('k') | mojo/services/network/url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698