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

Side by Side Diff: mojo/shell/url_request_context_getter.h

Issue 38303002: Enable Mojo to download from file URLs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/shell/network_delegate.cc ('k') | mojo/shell/url_request_context_getter.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ 5 #ifndef MOJO_SHELL_URL_REQUEST_CONTEXT_GETTER_H_
6 #define MOJO_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ 6 #define MOJO_SHELL_URL_REQUEST_CONTEXT_GETTER_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "net/base/network_delegate.h"
11 #include "net/url_request/url_request_context_getter.h" 12 #include "net/url_request/url_request_context_getter.h"
12 #include "net/url_request/url_request_context_storage.h" 13 #include "net/url_request/url_request_context_storage.h"
13 14
14 namespace mojo { 15 namespace mojo {
15 namespace shell { 16 namespace shell {
16 17
17 class URLRequestContextGetter : public net::URLRequestContextGetter { 18 class URLRequestContextGetter : public net::URLRequestContextGetter {
18 public: 19 public:
19 URLRequestContextGetter( 20 URLRequestContextGetter(
20 base::FilePath base_path, 21 base::FilePath base_path,
21 base::SingleThreadTaskRunner* network_task_runner, 22 base::SingleThreadTaskRunner* network_task_runner,
22 base::MessageLoopProxy* cache_task_runner); 23 base::SingleThreadTaskRunner* file_task_runner,
24 base::MessageLoopProxy* cache_task_runner,
25 scoped_ptr<net::NetworkDelegate> network_delegate);
23 26
24 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; 27 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
25 virtual scoped_refptr<base::SingleThreadTaskRunner> 28 virtual scoped_refptr<base::SingleThreadTaskRunner>
26 GetNetworkTaskRunner() const OVERRIDE; 29 GetNetworkTaskRunner() const OVERRIDE;
27 30
28 protected: 31 protected:
29 virtual ~URLRequestContextGetter(); 32 virtual ~URLRequestContextGetter();
30 33
31 private: 34 private:
32 base::FilePath base_path_; 35 base::FilePath base_path_;
36 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
33 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 37 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
34 scoped_refptr<base::MessageLoopProxy> cache_task_runner_; 38 scoped_refptr<base::MessageLoopProxy> cache_task_runner_;
39 scoped_ptr<net::NetworkDelegate> network_delegate_;
35 scoped_ptr<net::NetLog> net_log_; 40 scoped_ptr<net::NetLog> net_log_;
36 scoped_ptr<net::URLRequestContextStorage> storage_; 41 scoped_ptr<net::URLRequestContextStorage> storage_;
37 scoped_ptr<net::URLRequestContext> url_request_context_; 42 scoped_ptr<net::URLRequestContext> url_request_context_;
38 43
39 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter); 44 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
40 }; 45 };
41 46
42 } // namespace shell 47 } // namespace shell
43 } // namespace mojo 48 } // namespace mojo
44 49
45 #endif // MOJO_SHELL_URL_REQUEST_CONTEXT_GETTER_H_ 50 #endif // MOJO_SHELL_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW
« no previous file with comments | « mojo/shell/network_delegate.cc ('k') | mojo/shell/url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698