| 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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 url.SchemeIs(content::kChromeDevToolsScheme) || | 964 url.SchemeIs(content::kChromeDevToolsScheme) || |
| 965 url.SchemeIs(content::kChromeUIScheme) || | 965 url.SchemeIs(content::kChromeUIScheme) || |
| 966 url.SchemeIs(content::kViewSourceScheme) || | 966 url.SchemeIs(content::kViewSourceScheme) || |
| 967 url.SchemeIs(chrome::kChromeNativeScheme) || | 967 url.SchemeIs(chrome::kChromeNativeScheme) || |
| 968 url.SchemeIs(chrome::kChromeSearchScheme) || | 968 url.SchemeIs(chrome::kChromeSearchScheme) || |
| 969 url.SchemeIs(chrome::kDomDistillerScheme)) | 969 url.SchemeIs(chrome::kDomDistillerScheme)) |
| 970 return false; | 970 return false; |
| 971 | 971 |
| 972 // Allow all about: and chrome: URLs except about:blank, since the user may | 972 // Allow all about: and chrome: URLs except about:blank, since the user may |
| 973 // like to see "chrome://memory/", etc. in their history and autocomplete. | 973 // like to see "chrome://memory/", etc. in their history and autocomplete. |
| 974 if (url == GURL(content::kAboutBlankURL)) | 974 if (url == GURL(url::kAboutBlankURL)) |
| 975 return false; | 975 return false; |
| 976 | 976 |
| 977 return true; | 977 return true; |
| 978 } | 978 } |
| 979 | 979 |
| 980 base::WeakPtr<HistoryService> HistoryService::AsWeakPtr() { | 980 base::WeakPtr<HistoryService> HistoryService::AsWeakPtr() { |
| 981 DCHECK(thread_checker_.CalledOnValidThread()); | 981 DCHECK(thread_checker_.CalledOnValidThread()); |
| 982 return weak_ptr_factory_.GetWeakPtr(); | 982 return weak_ptr_factory_.GetWeakPtr(); |
| 983 } | 983 } |
| 984 | 984 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 DCHECK(thread_checker_.CalledOnValidThread()); | 1167 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1168 visit_database_observers_.RemoveObserver(observer); | 1168 visit_database_observers_.RemoveObserver(observer); |
| 1169 } | 1169 } |
| 1170 | 1170 |
| 1171 void HistoryService::NotifyVisitDBObserversOnAddVisit( | 1171 void HistoryService::NotifyVisitDBObserversOnAddVisit( |
| 1172 const history::BriefVisitInfo& info) { | 1172 const history::BriefVisitInfo& info) { |
| 1173 DCHECK(thread_checker_.CalledOnValidThread()); | 1173 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1174 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, | 1174 FOR_EACH_OBSERVER(history::VisitDatabaseObserver, visit_database_observers_, |
| 1175 OnAddVisit(info)); | 1175 OnAddVisit(info)); |
| 1176 } | 1176 } |
| OLD | NEW |