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

Unified Diff: chrome/browser/ui/browser.cc

Issue 8118012: WebUI Edit Search Engine Dialog (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: self review Created 9 years, 2 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: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index ad29969fdd6bcffba364e77dc72b034210ec012a..7b45c6a1e7acb96cd8239ffdd1f12dedd6390b45 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -112,6 +112,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"
@@ -3900,6 +3901,14 @@ void Browser::ConfirmSetDefaultSearchProvider(
void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url,
Profile* 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);
+ return;
+ }
arv (Not doing code reviews) 2011/10/04 20:55:01 remove return and use else
wyck 2011/10/04 21:57:57 Done.
window()->ConfirmAddSearchProvider(template_url, profile);
}

Powered by Google App Engine
This is Rietveld 408576698