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

Unified Diff: chrome/browser/printing/print_dialog_cloud.cc

Issue 373323003: Cache the current WebPreferences on RenderViewHostImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix android build. Created 6 years, 5 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/prefs/chrome_pref_service_unittest.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_dialog_cloud.cc
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index bf08701029c2442137a01ee04de92975b412fbb8..44e6c6db5e9c6c651bcd3b00b139366c26993a72 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -361,6 +361,8 @@ void CloudPrintFlowHandler::Observe(
// script permissions required for the web UI.
RenderViewHost* rvh = web_ui()->GetWebContents()->GetRenderViewHost();
if (rvh) {
+ // TODO(chrishtr): this is wrong. allow_scripts_to_close_windows will
+ // be reset the next time a preference changes.
WebPreferences webkit_prefs = rvh->GetWebkitPreferences();
webkit_prefs.allow_scripts_to_close_windows = true;
rvh->UpdateWebkitPreferences(webkit_prefs);
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_unittest.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698