summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/history.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 21:35:58 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 21:35:58 +0000
commitcaae8cb7cd14f44cad45871817fc4413050e9584 (patch)
tree6277692cf06ba00dcc5f72ce282e61b370d6219d /chrome/browser/history/history.cc
parent0c298a521ad3a8f5c22a47fc0be633322c1c2384 (diff)
downloadchromium_src-caae8cb7cd14f44cad45871817fc4413050e9584.zip
chromium_src-caae8cb7cd14f44cad45871817fc4413050e9584.tar.gz
chromium_src-caae8cb7cd14f44cad45871817fc4413050e9584.tar.bz2
Re-ban chrome:// URLs from being added to history until I can craft a more fine-grained solution.
BUG=23076 TEST=Hit ctrl-t, then ctrl-h, and verify you didn't just add "New Tab" to your history. Review URL: http://codereview.chromium.org/248005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27253 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/history.cc')
-rw-r--r--chrome/browser/history/history.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index 9d749cd..a8ed50b 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -620,9 +620,11 @@ bool HistoryService::CanAddURL(const GURL& url) const {
if (!url.is_valid())
return false;
- // We allow chrome://* URLs so that they will be added to history and
- // autocomplete suggestions.
+ // TODO: We should allow kChromeUIScheme URLs if they have been explicitly
+ // typed. Right now, however, these are marked as typed even when triggered
+ // by a shortcut or menu action.
if (url.SchemeIs(chrome::kJavaScriptScheme) ||
+ url.SchemeIs(chrome::kChromeUIScheme) ||
url.SchemeIs(chrome::kViewSourceScheme) ||
url.SchemeIs(chrome::kChromeInternalScheme) ||
url.SchemeIs(chrome::kPrintScheme))