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

Side by Side Diff: sync/internal_api/public/http_bridge.h

Issue 10918279: Provide mutable members of UrlRequestContext via pure-virtual interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // currently active profile. 51 // currently active profile.
52 RequestContext( 52 RequestContext(
53 net::URLRequestContext* baseline_context, 53 net::URLRequestContext* baseline_context,
54 const scoped_refptr<base::SingleThreadTaskRunner>& 54 const scoped_refptr<base::SingleThreadTaskRunner>&
55 network_task_runner, 55 network_task_runner,
56 const std::string& user_agent); 56 const std::string& user_agent);
57 57
58 // The destructor MUST be called on the IO thread. 58 // The destructor MUST be called on the IO thread.
59 virtual ~RequestContext(); 59 virtual ~RequestContext();
60 60
61 virtual const std::string& GetUserAgent(const GURL& url) const OVERRIDE;
62
63 private: 61 private:
64 net::URLRequestContext* const baseline_context_; 62 net::URLRequestContext* const baseline_context_;
65 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 63 const scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
66 const std::string user_agent_; 64 scoped_ptr<net::ConstHttpUserAgentSettings>
65 const_http_user_agent_settings_;
67 66
68 DISALLOW_COPY_AND_ASSIGN(RequestContext); 67 DISALLOW_COPY_AND_ASSIGN(RequestContext);
69 }; 68 };
70 69
71 // Lazy-getter for RequestContext objects. 70 // Lazy-getter for RequestContext objects.
72 class RequestContextGetter : public net::URLRequestContextGetter { 71 class RequestContextGetter : public net::URLRequestContextGetter {
73 public: 72 public:
74 RequestContextGetter( 73 RequestContextGetter(
75 net::URLRequestContextGetter* baseline_context_getter, 74 net::URLRequestContextGetter* baseline_context_getter,
76 const std::string& user_agent); 75 const std::string& user_agent);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 221
223 const scoped_refptr<HttpBridge::RequestContextGetter> 222 const scoped_refptr<HttpBridge::RequestContextGetter>
224 request_context_getter_; 223 request_context_getter_;
225 224
226 DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory); 225 DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory);
227 }; 226 };
228 227
229 } // namespace syncer 228 } // namespace syncer
230 229
231 #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_ 230 #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698