Chromium Code Reviews| Index: content/app/content_main.cc |
| diff --git a/content/app/content_main.cc b/content/app/content_main.cc |
| index 85d6144e306107051a9c1970a003d1c3623bf410..5b88e14149688d3bce27fc714cbcc4421b8215c2 100644 |
| --- a/content/app/content_main.cc |
| +++ b/content/app/content_main.cc |
| @@ -18,6 +18,7 @@ |
| #include "content/app/content_main_delegate.h" |
| #include "content/app/startup_helper_win.h" |
| #include "content/browser/browser_main.h" |
| +#include "content/common/content_client.h" |
| #include "content/common/content_constants.h" |
| #include "content/common/content_paths.h" |
| #include "content/common/main_function_params.h" |
| @@ -28,6 +29,7 @@ |
| #include "ipc/ipc_switches.h" |
| #include "ui/base/ui_base_switches.h" |
| #include "ui/base/ui_base_paths.h" |
| +#include "webkit/glue/webkit_glue.h" |
| #if defined(OS_WIN) |
| #include <atlbase.h> |
| @@ -203,6 +205,15 @@ int RunZygote(const MainFunctionParams& main_function_params, |
| // line so update it here with the new version. |
| const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| + // If a custom user agent was passed on the command line, we need |
| + // to (re)set it now, rather than using the default one the zygote |
| + // initialized. |
| + bool custom = false; |
| + std::string ua = content::GetContentClient()->GetUserAgent(&custom); |
| + if (custom) { |
|
jam
2011/10/15 01:32:04
nit: this file doesn't use brace brackets for sing
Dirk Pranke
2011/10/15 02:14:07
Will fix.
|
| + webkit_glue::ResetUserAgent(ua, custom); |
| + } |
| + |
| // The StatsTable must be initialized in each process; we already |
| // initialized for the browser process, now we need to initialize |
| // within the new processes as well. |