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

Side by Side Diff: remoting/host/url_request_context.h

Issue 10069020: Log Gaia response codes to ease diagnostics of networking issues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding a missing dependency. Created 8 years, 8 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 | « remoting/host/gaia_oauth_client.cc ('k') | remoting/host/url_request_context.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_HOST_URL_REQUEST_CONTEXT_H_ 5 #ifndef REMOTING_HOST_URL_REQUEST_CONTEXT_H_
6 #define REMOTING_HOST_URL_REQUEST_CONTEXT_H_ 6 #define REMOTING_HOST_URL_REQUEST_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "net/proxy/proxy_config_service.h" 13 #include "net/proxy/proxy_config_service.h"
14 #include "net/url_request/url_request_context.h" 14 #include "net/url_request/url_request_context.h"
15 #include "net/url_request/url_request_context_getter.h" 15 #include "net/url_request/url_request_context_getter.h"
16 #include "net/url_request/url_request_context_storage.h" 16 #include "net/url_request/url_request_context_storage.h"
17 #include "remoting/host/vlog_net_log.h"
17 18
18 namespace base { 19 namespace base {
19 class MessageLoopProxy; 20 class MessageLoopProxy;
20 } // namespace base 21 } // namespace base
21 22
22 namespace remoting { 23 namespace remoting {
23 24
24 // Subclass of net::URLRequestContext which can be used to store extra 25 // Subclass of net::URLRequestContext which can be used to store extra
25 // information for requests. This subclass is meant to be used in the 26 // information for requests. This subclass is meant to be used in the
26 // remoting Me2Me host process where the profile is not available. 27 // remoting Me2Me host process where the profile is not available.
27 class URLRequestContext : public net::URLRequestContext { 28 class URLRequestContext : public net::URLRequestContext {
28 public: 29 public:
29 explicit URLRequestContext(net::ProxyConfigService* net_proxy_config_service); 30 explicit URLRequestContext(net::ProxyConfigService* net_proxy_config_service);
30 31
31 private: 32 private:
32 virtual ~URLRequestContext(); 33 virtual ~URLRequestContext();
33 34
34 net::URLRequestContextStorage storage_; 35 net::URLRequestContextStorage storage_;
36 scoped_ptr<VlogNetLog> net_log_;
35 37
36 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); 38 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
37 }; 39 };
38 40
39 class URLRequestContextGetter : public net::URLRequestContextGetter { 41 class URLRequestContextGetter : public net::URLRequestContextGetter {
40 public: 42 public:
41 URLRequestContextGetter(MessageLoop* io_message_loop, 43 URLRequestContextGetter(MessageLoop* io_message_loop,
42 MessageLoop* file_message_loop); 44 MessageLoop* file_message_loop);
43 45
44 // Overridden from net::URLRequestContextGetter: 46 // Overridden from net::URLRequestContextGetter:
45 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; 47 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE;
46 virtual scoped_refptr<base::MessageLoopProxy> 48 virtual scoped_refptr<base::MessageLoopProxy>
47 GetIOMessageLoopProxy() const OVERRIDE; 49 GetIOMessageLoopProxy() const OVERRIDE;
48 50
49 protected: 51 protected:
50 virtual ~URLRequestContextGetter(); 52 virtual ~URLRequestContextGetter();
51 53
52 private: 54 private:
53 scoped_refptr<net::URLRequestContext> url_request_context_; 55 scoped_refptr<net::URLRequestContext> url_request_context_;
54 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 56 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
55 scoped_ptr<net::ProxyConfigService> proxy_config_service_; 57 scoped_ptr<net::ProxyConfigService> proxy_config_service_;
56 58
57 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter); 59 DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
58 }; 60 };
59 61
60 } // namespace remoting 62 } // namespace remoting
61 63
62 #endif // CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_ 64 #endif // CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « remoting/host/gaia_oauth_client.cc ('k') | remoting/host/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698