Chromium Code Reviews| Index: sync/internal_api/public/http_bridge.h |
| diff --git a/sync/internal_api/public/http_bridge.h b/sync/internal_api/public/http_bridge.h |
| index 880c588ae85b3d41517d2015ceb2266e9d203212..a54a768e254a4f72d5ac2337bed33ad9b167cf6c 100644 |
| --- a/sync/internal_api/public/http_bridge.h |
| +++ b/sync/internal_api/public/http_bridge.h |
| @@ -38,10 +38,13 @@ namespace syncer { |
| // This is a one-time use bridge. Create one for each request you want to make. |
| // It is RefCountedThreadSafe because it can PostTask to the io loop, and thus |
| // needs to stick around across context switches, etc. |
| -class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, |
| - public HttpPostProviderInterface, |
| - public net::URLFetcherDelegate { |
| +class SYNC_EXPORT_PRIVATE HttpBridge |
| + : public base::RefCountedThreadSafe<HttpBridge>, |
| + public HttpPostProviderInterface, |
| + public net::URLFetcherDelegate { |
| public: |
| + friend class SyncHttpBridgeTest; |
| + |
| // A request context used for HTTP requests bridged from the sync backend. |
| // A bridged RequestContext has a dedicated in-memory cookie store and does |
| // not use a cache. Thus the same type can be used for incognito mode. |
| @@ -69,7 +72,8 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, |
| }; |
| // Lazy-getter for RequestContext objects. |
| - class RequestContextGetter : public net::URLRequestContextGetter { |
| + class SYNC_EXPORT_PRIVATE RequestContextGetter |
| + : public net::URLRequestContextGetter { |
| public: |
| RequestContextGetter( |
| net::URLRequestContextGetter* baseline_context_getter, |
| @@ -118,11 +122,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, |
| // net::URLFetcherDelegate implementation. |
| virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
| -#if defined(UNIT_TEST) |
| - net::URLRequestContextGetter* GetRequestContextGetter() const { |
| - return context_getter_for_request_; |
| - } |
| -#endif |
| + net::URLRequestContextGetter* GetRequestContextGetter() const; |
|
akalin
2012/12/27 19:48:52
Append ForTest()
Raghu Simha
2013/01/02 06:49:24
Done.
|
| protected: |
| friend class base::RefCountedThreadSafe<HttpBridge>; |