Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 WEBKIT_COMMON_USER_AGENT_USER_AGENT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_USER_AGENT_H_ |
| 6 #define WEBKIT_COMMON_USER_AGENT_USER_AGENT_H_ | 6 #define CONTENT_PUBLIC_COMMON_USER_AGENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 class GURL; |
| 11 #include "url/gurl.h" | |
| 12 #include "webkit/common/user_agent/webkit_user_agent_export.h" | |
| 13 | 11 |
| 14 namespace webkit_glue { | 12 namespace content { |
| 15 | 13 |
| 16 // Sets the user agent. Pass true for overriding if this is a custom | 14 // Sets the user agent. Pass true for overriding if this is a custom |
| 17 // user agent instead of the default one (in order to turn off any browser | 15 // user agent instead of the default one (in order to turn off any browser |
| 18 // sniffing workarounds). This must be called before GetUserAgent() can | 16 // sniffing workarounds). This must be called before GetUserAgent() can |
| 19 // be called. | 17 // be called. |
| 20 WEBKIT_USER_AGENT_EXPORT void SetUserAgent(const std::string& user_agent, | 18 CONTENT_EXPORT void SetUserAgent(const std::string& user_agent, |
|
jam
2014/03/04 20:49:45
this is only called by code in content, so it shou
tfarina
2014/03/04 22:07:20
Done.
| |
| 21 bool overriding); | 19 bool overriding); |
| 22 | 20 |
| 23 // Returns the user agent to use for the given URL. SetUserAgent() must | 21 // Returns the user agent to use for the given URL. SetUserAgent() must |
| 24 // be called prior to calling this function. | 22 // be called prior to calling this function. |
| 25 WEBKIT_USER_AGENT_EXPORT const std::string& GetUserAgent(const GURL& url); | 23 CONTENT_EXPORT const std::string& GetUserAgent(const GURL& url); |
| 26 | 24 |
| 27 } // namespace webkit_glue | 25 } // namespace content |
| 28 | 26 |
| 29 #endif // WEBKIT_COMMON_USER_AGENT_USER_AGENT_H_ | 27 #endif // CONTENT_PUBLIC_COMMON_USER_AGENT_H_ |
| OLD | NEW |