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 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 virtual int GetResponseContentLength() const OVERRIDE; | 113 virtual int GetResponseContentLength() const OVERRIDE; |
114 virtual const char* GetResponseContent() const OVERRIDE; | 114 virtual const char* GetResponseContent() const OVERRIDE; |
115 virtual const std::string GetResponseHeaderValue( | 115 virtual const std::string GetResponseHeaderValue( |
116 const std::string& name) const OVERRIDE; | 116 const std::string& name) const OVERRIDE; |
117 | 117 |
118 // net::URLFetcherDelegate implementation. | 118 // net::URLFetcherDelegate implementation. |
119 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 119 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
120 | 120 |
121 #if defined(UNIT_TEST) | 121 #if defined(UNIT_TEST) |
122 net::URLRequestContextGetter* GetRequestContextGetter() const { | 122 net::URLRequestContextGetter* GetRequestContextGetter() const { |
123 return context_getter_for_request_; | 123 return context_getter_for_request_.get(); |
124 } | 124 } |
125 #endif | 125 #endif |
126 | 126 |
127 protected: | 127 protected: |
128 friend class base::RefCountedThreadSafe<HttpBridge>; | 128 friend class base::RefCountedThreadSafe<HttpBridge>; |
129 | 129 |
130 virtual ~HttpBridge(); | 130 virtual ~HttpBridge(); |
131 | 131 |
132 // Protected virtual so the unit test can override to shunt network requests. | 132 // Protected virtual so the unit test can override to shunt network requests. |
133 virtual void MakeAsynchronousPost(); | 133 virtual void MakeAsynchronousPost(); |
(...skipping 88 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 |