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

Unified Diff: ios/web/public/user_agent.mm

Issue 364853010: Move the iOS user agent functions to ios/web/public. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 5 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
« no previous file with comments | « ios/web/public/user_agent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/user_agent.mm
diff --git a/content/common/user_agent_ios.mm b/ios/web/public/user_agent.mm
similarity index 97%
rename from content/common/user_agent_ios.mm
rename to ios/web/public/user_agent.mm
index ca897c171b5e5b4d25f9bc0c74c6da79a860b780..879667e754035d6dd8d3dd0430fe0abb66e0ea3e 100644
--- a/content/common/user_agent_ios.mm
+++ b/ios/web/public/user_agent.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/public/common/user_agent.h"
+#include "ios/web/public/user_agent.h"
#import <UIKit/UIKit.h>
@@ -58,10 +58,6 @@ const UAVersions& GetUAVersionsForCurrentOS() {
return version_map[arraysize(version_map) - 1].ua_versions;
}
-} // namespace
-
-namespace content {
-
std::string BuildOSCpuInfo() {
int32 os_major_version = 0;
int32 os_minor_version = 0;
@@ -102,6 +98,10 @@ std::string BuildOSCpuInfo() {
return os_cpu;
}
+} // namespace
+
+namespace web {
+
std::string BuildUserAgentFromProduct(const std::string& product) {
// Retrieve the kernel build number.
int mib[2] = {CTL_KERN, KERN_OSVERSION};
@@ -127,4 +127,4 @@ std::string BuildUserAgentFromProduct(const std::string& product) {
return user_agent;
}
-} // namespace content
+} // namespace web
« no previous file with comments | « ios/web/public/user_agent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698