| 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..0146ea4c668e6296cca64f850b6bb3d2c5c04202
|
| --- /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 {
|
| + public:
|
| + // HttpUserAgentSettings implementation
|
| + virtual std::string GetAcceptLanguage() OVERRIDE;
|
| + virtual 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_
|
| +
|
|
|