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

Unified Diff: content/app/content_main_runner.cc

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/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 1846435082125f53e9e0e697e39b58afbe9c1cfc..dd65bca61eed7d0c657c70da6c4f80e7846dad53 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -29,6 +29,7 @@
#include "content/browser/gpu/gpu_process_host.h"
#include "content/common/set_process_title.h"
#include "content/common/url_schemes.h"
+#include "content/common/user_agent_internal.h"
#include "content/gpu/in_process_gpu_thread.h"
#include "content/public/app/content_main_delegate.h"
#include "content/public/app/startup_helper_win.h"
@@ -50,7 +51,6 @@
#include "ui/base/ui_base_paths.h"
#include "ui/base/ui_base_switches.h"
#include "ui/gfx/win/dpi.h"
-#include "webkit/common/user_agent/user_agent.h"
#if defined(USE_TCMALLOC)
#include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h"
@@ -383,8 +383,7 @@ int RunZygote(const MainFunctionParams& main_function_params,
// to (re)set it now, rather than using the default one the zygote
// initialized.
if (command_line.HasSwitch(switches::kUserAgent)) {
- webkit_glue::SetUserAgent(
- command_line.GetSwitchValueASCII(switches::kUserAgent), true);
+ SetUserAgent(command_line.GetSwitchValueASCII(switches::kUserAgent), true);
}
// The StatsTable must be initialized in each process; we already
@@ -742,11 +741,11 @@ class ContentMainRunnerImpl : public ContentMainRunner {
delegate->PreSandboxStartup();
// Set any custom user agent passed on the command line now so the string
- // doesn't change between calls to webkit_glue::GetUserAgent(), otherwise it
+ // doesn't change between calls to GetUserAgent(), otherwise it
// defaults to the user agent set during SetContentClient().
if (command_line.HasSwitch(switches::kUserAgent)) {
- webkit_glue::SetUserAgent(
- command_line.GetSwitchValueASCII(switches::kUserAgent), true);
+ SetUserAgent(command_line.GetSwitchValueASCII(switches::kUserAgent),
+ true);
}
if (!process_type.empty())

Powered by Google App Engine
This is Rietveld 408576698