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

Unified Diff: content/common/user_agent.cc

Issue 186883002: Move user_agent code from webkit/ to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/common/user_agent.cc
diff --git a/webkit/common/user_agent/user_agent.cc b/content/common/user_agent.cc
similarity index 91%
rename from webkit/common/user_agent/user_agent.cc
rename to content/common/user_agent.cc
index 9a1fdb0047ef6971505889484c6eb71ce7dbb1eb..f47ea057f58358b0743d0de6b0847368a2208f92 100644
--- a/webkit/common/user_agent/user_agent.cc
+++ b/content/common/user_agent.cc
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/common/user_agent/user_agent.h"
+#include "content/public/common/user_agent.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/lock.h"
-#include "webkit/common/user_agent/user_agent_util.h"
+#include "content/public/common/user_agent_util.h"
-namespace webkit_glue {
+namespace content {
namespace {
@@ -104,10 +104,9 @@ const std::string& UserAgentState::Get(const GURL& url) const {
BuildUserAgentFromProduct("Version/5.1.1 Safari/534.51.22");
#elif defined(OS_WIN)
// Pretend to be Firefox. Silverlight doesn't support Win Safari.
- base::StringAppendF(
- &user_agent_for_spoofing_hack_,
- "Mozilla/5.0 (%s) Gecko/20100101 Firefox/8.0",
- webkit_glue::BuildOSCpuInfo().c_str());
+ base::StringAppendF(&user_agent_for_spoofing_hack_,
+ "Mozilla/5.0 (%s) Gecko/20100101 Firefox/8.0",
+ BuildOSCpuInfo().c_str());
#endif
}
DCHECK(!user_agent_for_spoofing_hack_.empty());
@@ -130,4 +129,4 @@ const std::string& GetUserAgent(const GURL& url) {
return g_user_agent.Get().Get(url);
}
-} // namespace webkit_glue
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698