OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 public HttpPostProviderInterface, | 43 public HttpPostProviderInterface, |
44 public net::URLFetcherDelegate { | 44 public net::URLFetcherDelegate { |
45 public: | 45 public: |
46 friend class SyncHttpBridgeTest; | 46 friend class SyncHttpBridgeTest; |
47 | 47 |
48 // A request context used for HTTP requests bridged from the sync backend. | 48 // A request context used for HTTP requests bridged from the sync backend. |
49 // A bridged RequestContext has a dedicated in-memory cookie store and does | 49 // A bridged RequestContext has a dedicated in-memory cookie store and does |
50 // not use a cache. Thus the same type can be used for incognito mode. | 50 // not use a cache. Thus the same type can be used for incognito mode. |
51 class RequestContext : public net::URLRequestContext { | 51 class RequestContext : public net::URLRequestContext { |
52 public: | 52 public: |
53 // |baseline_context| is used to obtain the accept-language, | 53 // |baseline_context| is used to obtain the accept-language |
54 // accept-charsets, and proxy service information for bridged requests. | 54 // and proxy service information for bridged requests. |
55 // Typically |baseline_context| should be the net::URLRequestContext of the | 55 // Typically |baseline_context| should be the net::URLRequestContext of the |
56 // currently active profile. | 56 // currently active profile. |
57 RequestContext( | 57 RequestContext( |
58 net::URLRequestContext* baseline_context, | 58 net::URLRequestContext* baseline_context, |
59 const scoped_refptr<base::SingleThreadTaskRunner>& | 59 const scoped_refptr<base::SingleThreadTaskRunner>& |
60 network_task_runner, | 60 network_task_runner, |
61 const std::string& user_agent); | 61 const std::string& user_agent); |
62 | 62 |
63 // The destructor MUST be called on the IO thread. | 63 // The destructor MUST be called on the IO thread. |
64 virtual ~RequestContext(); | 64 virtual ~RequestContext(); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 const scoped_refptr<HttpBridge::RequestContextGetter> | 223 const scoped_refptr<HttpBridge::RequestContextGetter> |
224 request_context_getter_; | 224 request_context_getter_; |
225 | 225 |
226 DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory); | 226 DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory); |
227 }; | 227 }; |
228 | 228 |
229 } // namespace syncer | 229 } // namespace syncer |
230 | 230 |
231 #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ | 231 #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ |
OLD | NEW |