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

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

Issue 7670041: Add --use-more-webui runtime flag to toggle WebUI replacements for native dialogs. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge with trunk. Created 9 years, 3 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
« no previous file with comments | « chrome/browser/ui/webui/html_dialog_ui.h ('k') | chrome/browser/ui/webui/hung_renderer_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/html_dialog_ui.cc
diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc
index fd3341a4bbe187646a511a3a239a7d6a266e4bbf..9f01d1582ec1cc008bf7af2dac8e0ce505222a2d 100644
--- a/chrome/browser/ui/webui/html_dialog_ui.cc
+++ b/chrome/browser/ui/webui/html_dialog_ui.cc
@@ -29,6 +29,10 @@ HtmlDialogUI::~HtmlDialogUI() {
// and the HTML dialogs won't swap WebUIs anyway since they don't navigate.
}
+void HtmlDialogUI::CloseDialog(const base::ListValue* args) {
+ OnDialogClosed(args);
+}
+
// static
PropertyAccessor<HtmlDialogUIDelegate*>& HtmlDialogUI::GetPropertyAccessor() {
return g_html_dialog_ui_property_accessor.Get();
@@ -67,8 +71,8 @@ void HtmlDialogUI::OnDialogClosed(const ListValue* args) {
tab_contents()->property_bag());
if (delegate) {
std::string json_retval;
- if (!args->GetString(0, &json_retval))
- NOTREACHED() << "Could not read JSON arguments";
+ if (args && !args->empty() && !args->GetString(0, &json_retval))
+ NOTREACHED() << "Could not read JSON argument";
(*delegate)->OnDialogClosed(json_retval);
}
« no previous file with comments | « chrome/browser/ui/webui/html_dialog_ui.h ('k') | chrome/browser/ui/webui/hung_renderer_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698