Chromium Code Reviews| Index: chrome/app/chrome_main_delegate.cc |
| diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc |
| index 5a492d93cb23180bfb64663816e3f8c4aa030800..01f44fc5fb1d06513bbb34dadcd6d6bec9c53452 100644 |
| --- a/chrome/app/chrome_main_delegate.cc |
| +++ b/chrome/app/chrome_main_delegate.cc |
| @@ -36,6 +36,7 @@ |
| #include "content/public/common/content_switches.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/base/ui_base_switches.h" |
| +#include "webkit/glue/user_agent.h" |
| #if defined(OS_WIN) |
| #include <algorithm> |
| @@ -544,8 +545,14 @@ void ChromeMainDelegate::PreSandboxStartup() { |
| std::string process_type = |
| command_line.GetSwitchValueASCII(switches::kProcessType); |
| + // Construct our user agent string. |
| + chrome::VersionInfo version_info; |
| + std::string product("Chrome/"); |
| + product += version_info.is_valid() ? version_info.Version() : "0.0.0.0"; |
| + std::string user_agent = webkit_glue::BuildUserAgentFromProduct(product); |
|
scherkus (not reviewing)
2012/04/05 23:20:45
FYI this code was moved here instead of chrome_con
|
| + |
| // Initialize the content client which that code uses to talk to Chrome. |
| - content::SetContentClient(&chrome_content_client_); |
| + content::Initialize(&chrome_content_client_, user_agent); |
| InitializeChromeContentClient(process_type); |
|
Dirk Pranke
2012/04/05 23:35:54
Nit: does it make sense to change this to somethin
scherkus (not reviewing)
2012/04/05 23:58:33
Agreed but will wait to hear back on jam on which
|
| // Initialize the Chrome path provider. |