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

Side by Side Diff: chrome/browser/history/history_service.cc

Issue 23478034: Do not add history entries for chrome-search:// urls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The history system runs on a background thread so that potentially slow 5 // The history system runs on a background thread so that potentially slow
6 // database operations don't delay the browser. This backend processing is 6 // database operations don't delay the browser. This backend processing is
7 // represented by HistoryBackend. The HistoryService's job is to dispatch to 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to
8 // that thread. 8 // that thread.
9 // 9 //
10 // Main thread History thread 10 // Main thread History thread
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 if (!url.is_valid()) 981 if (!url.is_valid())
982 return false; 982 return false;
983 983
984 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly 984 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly
985 // typed. Right now, however, these are marked as typed even when triggered 985 // typed. Right now, however, these are marked as typed even when triggered
986 // by a shortcut or menu action. 986 // by a shortcut or menu action.
987 if (url.SchemeIs(content::kJavaScriptScheme) || 987 if (url.SchemeIs(content::kJavaScriptScheme) ||
988 url.SchemeIs(chrome::kChromeDevToolsScheme) || 988 url.SchemeIs(chrome::kChromeDevToolsScheme) ||
989 url.SchemeIs(chrome::kChromeNativeScheme) || 989 url.SchemeIs(chrome::kChromeNativeScheme) ||
990 url.SchemeIs(chrome::kChromeUIScheme) || 990 url.SchemeIs(chrome::kChromeUIScheme) ||
991 url.SchemeIs(chrome::kChromeSearchScheme) ||
991 url.SchemeIs(content::kViewSourceScheme) || 992 url.SchemeIs(content::kViewSourceScheme) ||
992 url.SchemeIs(chrome::kChromeInternalScheme)) 993 url.SchemeIs(chrome::kChromeInternalScheme))
993 return false; 994 return false;
994 995
995 // Allow all about: and chrome: URLs except about:blank, since the user may 996 // Allow all about: and chrome: URLs except about:blank, since the user may
996 // like to see "chrome://memory/", etc. in their history and autocomplete. 997 // like to see "chrome://memory/", etc. in their history and autocomplete.
997 if (url == GURL(content::kAboutBlankURL)) 998 if (url == GURL(content::kAboutBlankURL))
998 return false; 999 return false;
999 1000
1000 return true; 1001 return true;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 DCHECK(thread_checker_.CalledOnValidThread()); 1231 DCHECK(thread_checker_.CalledOnValidThread());
1231 visit_database_observers_.RemoveObserver(observer); 1232 visit_database_observers_.RemoveObserver(observer);
1232 } 1233 }
1233 1234
1234 void HistoryService::NotifyVisitDBObserversOnAddVisit( 1235 void HistoryService::NotifyVisitDBObserversOnAddVisit(
1235 const history::BriefVisitInfo& info) { 1236 const history::BriefVisitInfo& info) {
1236 DCHECK(thread_checker_.CalledOnValidThread()); 1237 DCHECK(thread_checker_.CalledOnValidThread());
1237 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, 1238 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_,
1238 OnAddVisit(info)); 1239 OnAddVisit(info));
1239 } 1240 }
OLDNEW
« 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