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

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

Issue 444843002: Cache the current WebPreferences on RenderViewHostImpl (try #2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 6 years, 4 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 9269c7f7d3af0e690a819cd991e93748eccd1443..d0e67d2e964562889e9687ab3a04b6aff121fba3 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