| 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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 return false; | 1004 return false; |
| 1005 | 1005 |
| 1006 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly | 1006 // TODO: We should allow kChromeUIScheme URLs if they have been explicitly |
| 1007 // typed. Right now, however, these are marked as typed even when triggered | 1007 // typed. Right now, however, these are marked as typed even when triggered |
| 1008 // by a shortcut or menu action. | 1008 // by a shortcut or menu action. |
| 1009 if (url.SchemeIs(content::kJavaScriptScheme) || | 1009 if (url.SchemeIs(content::kJavaScriptScheme) || |
| 1010 url.SchemeIs(chrome::kChromeDevToolsScheme) || | 1010 url.SchemeIs(chrome::kChromeDevToolsScheme) || |
| 1011 url.SchemeIs(chrome::kChromeNativeScheme) || | 1011 url.SchemeIs(chrome::kChromeNativeScheme) || |
| 1012 url.SchemeIs(chrome::kChromeUIScheme) || | 1012 url.SchemeIs(chrome::kChromeUIScheme) || |
| 1013 url.SchemeIs(chrome::kChromeSearchScheme) || | 1013 url.SchemeIs(chrome::kChromeSearchScheme) || |
| 1014 url.SchemeIs(chrome::kDomDistillerScheme) || |
| 1014 url.SchemeIs(content::kViewSourceScheme)) | 1015 url.SchemeIs(content::kViewSourceScheme)) |
| 1015 return false; | 1016 return false; |
| 1016 | 1017 |
| 1017 // Allow all about: and chrome: URLs except about:blank, since the user may | 1018 // Allow all about: and chrome: URLs except about:blank, since the user may |
| 1018 // like to see "chrome://memory/", etc. in their history and autocomplete. | 1019 // like to see "chrome://memory/", etc. in their history and autocomplete. |
| 1019 if (url == GURL(content::kAboutBlankURL)) | 1020 if (url == GURL(content::kAboutBlankURL)) |
| 1020 return false; | 1021 return false; |
| 1021 | 1022 |
| 1022 return true; | 1023 return true; |
| 1023 } | 1024 } |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 DCHECK(thread_checker_.CalledOnValidThread()); | 1254 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1254 visit_database_observers_.RemoveObserver(observer); | 1255 visit_database_observers_.RemoveObserver(observer); |
| 1255 } | 1256 } |
| 1256 | 1257 |
| 1257 void HistoryService::NotifyVisitDBObserversOnAddVisit( | 1258 void HistoryService::NotifyVisitDBObserversOnAddVisit( |
| 1258 const history::BriefVisitInfo& info) { | 1259 const history::BriefVisitInfo& info) { |
| 1259 DCHECK(thread_checker_.CalledOnValidThread()); | 1260 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1260 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, | 1261 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, |
| 1261 OnAddVisit(info)); | 1262 OnAddVisit(info)); |
| 1262 } | 1263 } |
| OLD | NEW |