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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 7918011: Print Preview: Disable right click -> "Save As" for preview PDF. Users should just print to PDF i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 101261)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -1190,10 +1190,12 @@
if (!local_state->GetBoolean(prefs::kAllowFileSelectionDialogs))
return false;
- return (params_.media_flags &
- WebContextMenuData::MediaCanSave) &&
- params_.src_url.is_valid() &&
- ProfileIOData::IsHandledProtocol(params_.src_url.scheme());
+ const GURL& url = params_.src_url;
+ return (params_.media_flags & WebContextMenuData::MediaCanSave) &&
+ url.is_valid() && ProfileIOData::IsHandledProtocol(url.scheme()) &&
+ // Do not save the preview PDF on the print preview page.
+ !(url.SchemeIs(chrome::kChromeUIScheme) &&
brettw 2011/09/16 05:19:14 This code is getting a bit crazy. Can you make a l
Lei Zhang 2011/09/16 20:00:50 Done.
+ url.host() == chrome::kChromeUIPrintHost);
}
case IDC_CONTENT_CONTEXT_OPENAVNEWTAB:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698