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

Unified Diff: chrome/browser/browser.cc

Issue 3027023: When the kChromeUIScheme was made savable, it also broke the disabling of the (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 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 | « 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/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index fb43c997fd6317d99acbdfa4b88b791d0c9fca06..6a477a73d7e1beab3b499bf139e00910d0dfa84b 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -3272,11 +3272,16 @@ void Browser::UpdateCommandsForTabState() {
bool is_savable_url =
SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL());
command_updater_.UpdateCommandEnabled(IDC_SAVE_PAGE, is_savable_url);
- command_updater_.UpdateCommandEnabled(IDC_ENCODING_MENU, is_savable_url &&
- SavePackage::IsSavableContents(current_tab->contents_mime_type()));
command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION,
current_tab->ShouldDisplayURL() && current_tab->GetURL().is_valid());
+ // Changing the encoding is not possible on Chrome-internal webpages.
+ bool is_chrome_internal = (active_entry ?
+ active_entry->url().SchemeIs(chrome::kChromeUIScheme) : false);
+ command_updater_.UpdateCommandEnabled(IDC_ENCODING_MENU,
+ !is_chrome_internal && SavePackage::IsSavableContents(
+ current_tab->contents_mime_type()));
+
// Show various bits of UI
// TODO(pinkerton): Disable app-mode in the model until we implement it
// on the Mac. Be sure to remove both ifdefs. http://crbug.com/13148
« 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