summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--chrome/browser/history/history.cc6
-rw-r--r--chrome/common/url_constants.h2
2 files changed, 5 insertions, 3 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))
diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h
index a75e95a..ff1b5ab 100644
--- a/chrome/common/url_constants.h
+++ b/chrome/common/url_constants.h
@@ -11,7 +11,7 @@ namespace chrome {
// Canonical schemes you can use as input to GURL.SchemeIs().
extern const char kAboutScheme[];
-extern const char kChromeInternalScheme[]; // Used for new tab page.
+extern const char kChromeInternalScheme[];
extern const char kChromeUIScheme[]; // The scheme used for DOMUIContentses.
extern const char kDataScheme[];
extern const char kExtensionScheme[];