Index: chrome/browser/browser_main.cc |
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc |
index 19f4d6c7a7848605ee85ae23d0a9b70f1dd5ffba..04dddce416936ed69ef49143a1d4dbb8502b1fdb 100644 |
--- a/chrome/browser/browser_main.cc |
+++ b/chrome/browser/browser_main.cc |
@@ -74,6 +74,7 @@ |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_init.h" |
#include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" |
+#include "chrome/browser/ui/webui/web_ui_factory.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_switches.h" |
@@ -1457,11 +1458,14 @@ int BrowserMain(const MainFunctionParams& parameters) { |
PrefService* user_prefs = profile->GetPrefs(); |
DCHECK(user_prefs); |
- // Override the default ContentBrowserClient to let Chrome participate in |
+ // Override the default ContentBrowserClient and to let Chrome participate in |
// content logic. Must be done before any tabs are created. |
chrome::ChromeContentBrowserClient browser_client; |
content::GetContentClient()->set_browser(&browser_client); |
+ // Do the same for the ContentWebUIClient. |
+ content::GetContentClient()->set_web_ui(WebUIFactory::GetInstance()); |
+ |
// Tests should be able to tune login manager before showing it. |
// Thus only show login manager in normal (non-testing) mode. |
if (!parameters.ui_task) { |