| Index: chrome/browser/ui/browser.cc
|
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
| index 67a532374ce145d6e0b6df88a879d50592e204e3..c539066cc1f8ed0017b87b98a009eff1322be3c7 100644
|
| --- a/chrome/browser/ui/browser.cc
|
| +++ b/chrome/browser/ui/browser.cc
|
| @@ -113,6 +113,7 @@
|
| #include "chrome/browser/ui/tabs/tab_menu_model.h"
|
| #include "chrome/browser/ui/web_applications/web_app_ui.h"
|
| #include "chrome/browser/ui/webui/bug_report_ui.h"
|
| +#include "chrome/browser/ui/webui/chrome_web_ui.h"
|
| #include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h"
|
| #include "chrome/browser/ui/webui/options/content_settings_handler.h"
|
| #include "chrome/browser/ui/window_sizer.h"
|
| @@ -3951,7 +3952,15 @@ void Browser::ConfirmSetDefaultSearchProvider(
|
|
|
| void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url,
|
| Profile* profile) {
|
| - window()->ConfirmAddSearchProvider(template_url, profile);
|
| + // If we are using web UI dialogs, then redirect this dialog to the web UI
|
| + // version. Otherwise, call the existing framework, which is called by way of
|
| + // window()->ConfirmAddSearchProvider.
|
| + if (ChromeWebUI::IsMoreWebUI()) {
|
| + // Call a clean API to confirm adding a search provider.
|
| + browser::ConfirmAddSearchProvider(template_url, profile);
|
| + } else {
|
| + window()->ConfirmAddSearchProvider(template_url, profile);
|
| + }
|
| }
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|