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

Side by Side Diff: net/url_request/static_http_user_agent_settings.h

Issue 10918279: Provide mutable members of UrlRequestContext via pure-virtual interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const-ify HUAS getters Created 8 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_URL_REQUEST_CONST_HTTP_USER_AGENT_SETTINGS_H_
6 #define NET_URL_REQUEST_CONST_HTTP_USER_AGENT_SETTINGS_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
mmenke 2012/10/25 18:06:33 nit: Should probably be including basictypes as w
11 #include "net/url_request/http_user_agent_settings.h"
12
13 namespace net {
14
15 // An implementation of |HttpUserAgentSettings| that always provides the
16 // same constant values for the HTTP Accept-Language, Accept-Charset, and
17 // User-Agent headers.
18 class NET_EXPORT StaticHttpUserAgentSettings : public HttpUserAgentSettings {
19 public:
20 StaticHttpUserAgentSettings(const std::string& accept_language,
21 const std::string& accept_charset,
22 const std::string& user_agent);
23 virtual ~StaticHttpUserAgentSettings();
24
25 // HttpUserAgentSettings implementation
26 virtual std::string GetAcceptLanguage() const OVERRIDE;
27 virtual std::string GetAcceptCharset() const OVERRIDE;
28 virtual std::string GetUserAgent(const GURL& url) const OVERRIDE;
29
30 private:
31 const std::string accept_language_;
32 const std::string accept_charset_;
33 const std::string user_agent_;
34
35 DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
36 };
37
38 } // namespace net
39
40 #endif // NET_URL_REQUEST_CONST_HTTP_USER_AGENT_SETTINGS_H_
41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698