http_user_agent_settings.h 960 B

1234567891011121314151617181920212223242526272829303132
  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. #ifndef NET_BASE_HTTP_USER_AGENT_SETTINGS_H_
  5. #define NET_BASE_HTTP_USER_AGENT_SETTINGS_H_
  6. #include <string>
  7. #include "net/base/net_export.h"
  8. namespace net {
  9. // The interface used by HTTP jobs to retrieve HTTP Accept-Language
  10. // and User-Agent header values.
  11. class NET_EXPORT HttpUserAgentSettings {
  12. public:
  13. HttpUserAgentSettings() = default;
  14. HttpUserAgentSettings(const HttpUserAgentSettings&) = delete;
  15. HttpUserAgentSettings& operator=(const HttpUserAgentSettings&) = delete;
  16. virtual ~HttpUserAgentSettings() = default;
  17. // Gets the value of 'Accept-Language' header field.
  18. virtual std::string GetAcceptLanguage() const = 0;
  19. // Gets the UA string.
  20. virtual std::string GetUserAgent() const = 0;
  21. };
  22. } // namespace net
  23. #endif // NET_BASE_HTTP_USER_AGENT_SETTINGS_H_