OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |