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

Unified Diff: content/public/common/user_agent.h

Issue 186883002: Move user_agent code from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: link chrome Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/public/common/user_agent.h
diff --git a/webkit/common/user_agent/user_agent_util.h b/content/public/common/user_agent.h
similarity index 47%
rename from webkit/common/user_agent/user_agent_util.h
rename to content/public/common/user_agent.h
index e23b809a5050fe1e5fae2a6b1be1f4c440f61f1e..4d6f8e6c52bf3bbd9b2752890d3be06e4c5bd2c1 100644
--- a/webkit/common/user_agent/user_agent_util.h
+++ b/content/public/common/user_agent.h
@@ -2,39 +2,44 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_COMMON_USER_AGENT_USER_AGENT_UTIL_H_
-#define WEBKIT_COMMON_USER_AGENT_USER_AGENT_UTIL_H_
+#ifndef CONTENT_PUBLIC_COMMON_USER_AGENT_H_
+#define CONTENT_PUBLIC_COMMON_USER_AGENT_H_
#include <string>
-#include "base/basictypes.h"
-#include "webkit/common/user_agent/webkit_user_agent_export.h"
+#include "content/common/content_export.h"
-namespace webkit_glue {
+class GURL;
+
+namespace content {
+
+// Returns the user agent to use for the given URL. SetUserAgent() must
+// be called prior to calling this function.
jam 2014/03/05 00:09:26 nit: remove the second part of the comment since i
tfarina 2014/03/05 00:42:52 Done.
+CONTENT_EXPORT const std::string& GetUserAgent(const GURL& url);
// Builds a User-agent compatible string that describes the OS and CPU type.
-WEBKIT_USER_AGENT_EXPORT std::string BuildOSCpuInfo();
+CONTENT_EXPORT std::string BuildOSCpuInfo();
// Returns the WebKit version, in the form "major.minor (branch@revision)".
-WEBKIT_USER_AGENT_EXPORT std::string GetWebKitVersion();
+CONTENT_EXPORT std::string GetWebKitVersion();
// The following 2 functions return the major and minor webkit versions.
-WEBKIT_USER_AGENT_EXPORT int GetWebKitMajorVersion();
-WEBKIT_USER_AGENT_EXPORT int GetWebKitMinorVersion();
+CONTENT_EXPORT int GetWebKitMajorVersion();
+CONTENT_EXPORT int GetWebKitMinorVersion();
-WEBKIT_USER_AGENT_EXPORT std::string GetWebKitRevision();
+CONTENT_EXPORT std::string GetWebKitRevision();
// Helper function to generate a full user agent string from a short
// product name.
-WEBKIT_USER_AGENT_EXPORT std::string BuildUserAgentFromProduct(
+CONTENT_EXPORT std::string BuildUserAgentFromProduct(
const std::string& product);
// Builds a full user agent string given a string describing the OS and a
// product name.
-WEBKIT_USER_AGENT_EXPORT std::string BuildUserAgentFromOSAndProduct(
+CONTENT_EXPORT std::string BuildUserAgentFromOSAndProduct(
const std::string& os_info,
const std::string& product);
-} // namespace webkit_glue
+} // namespace content
-#endif // WEBKIT_COMMON_USER_AGENT_USER_AGENT_UTIL_H_
+#endif // CONTENT_PUBLIC_COMMON_USER_AGENT_H_

Powered by Google App Engine
This is Rietveld 408576698