| 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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 | 1017 |
| 1018 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly | 1018 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly |
| 1019 // typed. Right now, however, these are marked as typed even when triggered | 1019 // typed. Right now, however, these are marked as typed even when triggered |
| 1020 // by a shortcut or menu action. | 1020 // by a shortcut or menu action. |
| 1021 if (url.SchemeIs(content::kJavaScriptScheme) || | 1021 if (url.SchemeIs(content::kJavaScriptScheme) || |
| 1022 url.SchemeIs(chrome::kChromeDevToolsScheme) || | 1022 url.SchemeIs(chrome::kChromeDevToolsScheme) || |
| 1023 url.SchemeIs(chrome::kChromeNativeScheme) || | 1023 url.SchemeIs(chrome::kChromeNativeScheme) || |
| 1024 url.SchemeIs(chrome::kChromeUIScheme) || | 1024 url.SchemeIs(chrome::kChromeUIScheme) || |
| 1025 url.SchemeIs(chrome::kChromeSearchScheme) || | 1025 url.SchemeIs(chrome::kChromeSearchScheme) || |
| 1026 url.SchemeIs(content::kViewSourceScheme) || | 1026 url.SchemeIs(content::kViewSourceScheme) || |
| 1027 url.SchemeIs(chrome::kChromeInternalScheme)) | 1027 url.SchemeIs(chrome::kChromeInternalScheme) || |
| 1028 url.SchemeIs(chrome::kDomDistillerScheme)) |
| 1028 return false; | 1029 return false; |
| 1029 | 1030 |
| 1030 // Allow all about: and chrome: URLs except about:blank, since the user may | 1031 // Allow all about: and chrome: URLs except about:blank, since the user may |
| 1031 // like to see "chrome://memory/", etc. in their history and autocomplete. | 1032 // like to see "chrome://memory/", etc. in their history and autocomplete. |
| 1032 if (url == GURL(content::kAboutBlankURL)) | 1033 if (url == GURL(content::kAboutBlankURL)) |
| 1033 return false; | 1034 return false; |
| 1034 | 1035 |
| 1035 return true; | 1036 return true; |
| 1036 } | 1037 } |
| 1037 | 1038 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 DCHECK(thread_checker_.CalledOnValidThread()); | 1266 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1266 visit_database_observers_.RemoveObserver(observer); | 1267 visit_database_observers_.RemoveObserver(observer); |
| 1267 } | 1268 } |
| 1268 | 1269 |
| 1269 void HistoryService::NotifyVisitDBObserversOnAddVisit( | 1270 void HistoryService::NotifyVisitDBObserversOnAddVisit( |
| 1270 const history::BriefVisitInfo& info) { | 1271 const history::BriefVisitInfo& info) { |
| 1271 DCHECK(thread_checker_.CalledOnValidThread()); | 1272 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1272 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, | 1273 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, |
| 1273 OnAddVisit(info)); | 1274 OnAddVisit(info)); |
| 1274 } | 1275 } |
| OLD | NEW |