OLD | NEW |
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 CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 net::URLRequestContextGetter* baseline_context_getter); | 79 net::URLRequestContextGetter* baseline_context_getter); |
80 | 80 |
81 void set_user_agent(const std::string& ua) { user_agent_ = ua; } | 81 void set_user_agent(const std::string& ua) { user_agent_ = ua; } |
82 bool is_user_agent_set() const { return !user_agent_.empty(); } | 82 bool is_user_agent_set() const { return !user_agent_.empty(); } |
83 | 83 |
84 // net::URLRequestContextGetter implementation. | 84 // net::URLRequestContextGetter implementation. |
85 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; | 85 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; |
86 virtual scoped_refptr<base::MessageLoopProxy> | 86 virtual scoped_refptr<base::MessageLoopProxy> |
87 GetIOMessageLoopProxy() const OVERRIDE; | 87 GetIOMessageLoopProxy() const OVERRIDE; |
88 | 88 |
| 89 protected: |
| 90 virtual ~RequestContextGetter(); |
| 91 |
89 private: | 92 private: |
90 virtual ~RequestContextGetter() {} | |
91 | |
92 // User agent to apply to the net::URLRequestContext. | 93 // User agent to apply to the net::URLRequestContext. |
93 std::string user_agent_; | 94 std::string user_agent_; |
94 | 95 |
95 scoped_refptr<net::URLRequestContextGetter> baseline_context_getter_; | 96 scoped_refptr<net::URLRequestContextGetter> baseline_context_getter_; |
96 | 97 |
97 // Lazily initialized by GetURLRequestContext(). | 98 // Lazily initialized by GetURLRequestContext(). |
98 scoped_refptr<RequestContext> context_; | 99 scoped_refptr<RequestContext> context_; |
99 | 100 |
100 DISALLOW_COPY_AND_ASSIGN(RequestContextGetter); | 101 DISALLOW_COPY_AND_ASSIGN(RequestContextGetter); |
101 }; | 102 }; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 HttpBridge::RequestContextGetter* GetRequestContextGetter(); | 225 HttpBridge::RequestContextGetter* GetRequestContextGetter(); |
225 | 226 |
226 scoped_refptr<HttpBridge::RequestContextGetter> request_context_getter_; | 227 scoped_refptr<HttpBridge::RequestContextGetter> request_context_getter_; |
227 | 228 |
228 DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory); | 229 DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory); |
229 }; | 230 }; |
230 | 231 |
231 } // namespace browser_sync | 232 } // namespace browser_sync |
232 | 233 |
233 #endif // CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_ | 234 #endif // CHROME_BROWSER_SYNC_GLUE_HTTP_BRIDGE_H_ |
OLD | NEW |