Chromium Code Reviews| Index: net/url_request/const_http_accept_language_and_charset.h |
| diff --git a/net/url_request/const_http_accept_language_and_charset.h b/net/url_request/const_http_accept_language_and_charset.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f325cec8f9b9bad5f0a903e8af95a714ea77b772 |
| --- /dev/null |
| +++ b/net/url_request/const_http_accept_language_and_charset.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NET_URL_REQUEST_CONST_HTTP_ACCEPT_LANGUAGE_AND_CHARSET_H_ |
| +#define NET_URL_REQUEST_CONST_HTTP_ACCEPT_LANGUAGE_AND_CHARSET_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/compiler_specific.h" |
| +#include "net/url_request/http_user_agent_settings.h" |
| + |
| +namespace net { |
| + |
| +// A partial implementation of |HttpUserAgentSettings| that always provides |
| +// the same constant values for the HTTP Accept-Language and Accept-Charset |
| +// headers. Implementors can inherit from this class and implement |
| +// |GetUserAgent()|. |
| +class NET_EXPORT ConstHttpAcceptLanguageAndCharset |
| + : public HttpUserAgentSettings { |
|
mmenke
2012/09/26 16:28:20
4 space indent.
|
| + public: |
| + // HttpUserAgentSettings implementation |
| + virtual const std::string& GetAcceptLanguage() OVERRIDE; |
| + virtual const std::string& GetAcceptCharset() OVERRIDE; |
| + |
| + protected: |
| + ConstHttpAcceptLanguageAndCharset(const std::string& accept_language, |
| + const std::string& accept_charset); |
| + virtual ~ConstHttpAcceptLanguageAndCharset() {} |
| + |
| + private: |
| + const std::string accept_language_; |
| + const std::string accept_charset_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ConstHttpAcceptLanguageAndCharset); |
| +}; |
| + |
| +} // namespace net |
| + |
| +#endif // NET_URL_REQUEST_CONST_HTTP_ACCEPT_LANGUAGE_AND_CHARSET_H_ |
| + |