| 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 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // The context/page ids can be null if there is no meaningful tracking | 191 // The context/page ids can be null if there is no meaningful tracking |
| 192 // information that can be performed on the given URL. The 'nav_entry_id' | 192 // information that can be performed on the given URL. The 'nav_entry_id' |
| 193 // should be the unique ID of the current navigation entry in the given | 193 // should be the unique ID of the current navigation entry in the given |
| 194 // process. | 194 // process. |
| 195 // | 195 // |
| 196 // 'redirects' is an array of redirect URLs leading to this page, with the | 196 // 'redirects' is an array of redirect URLs leading to this page, with the |
| 197 // page itself as the last item (so when there is no redirect, it will have | 197 // page itself as the last item (so when there is no redirect, it will have |
| 198 // one entry). If there are no redirects, this array may also be empty for | 198 // one entry). If there are no redirects, this array may also be empty for |
| 199 // the convenience of callers. | 199 // the convenience of callers. |
| 200 // | 200 // |
| 201 // 'did_replace_entry' is true when the navigation entry for this page has | 201 // 'replaced_entry_url' is non-empty when the navigation entry for this page |
| 202 // replaced the existing entry. A non-user initiated redirect causes such | 202 // has replaced the existing entry. A non-user initiated redirect causes such |
| 203 // replacement. | 203 // replacement. |
| 204 // | 204 // |
| 205 // All "Add Page" functions will update the visited link database. | 205 // All "Add Page" functions will update the visited link database. |
| 206 void AddPage(const GURL& url, | 206 void AddPage(const GURL& url, |
| 207 base::Time time, | 207 base::Time time, |
| 208 ContextID context_id, | 208 ContextID context_id, |
| 209 int nav_entry_id, | 209 int nav_entry_id, |
| 210 const GURL& referrer, | 210 const GURL& referrer, |
| 211 const RedirectList& redirects, | 211 const RedirectList& redirects, |
| 212 ui::PageTransition transition, | 212 ui::PageTransition transition, |
| 213 VisitSource visit_source, | 213 VisitSource visit_source, |
| 214 bool did_replace_entry); | 214 base::Optional<GURL> replaced_entry_url); |
| 215 | 215 |
| 216 // For adding pages to history where no tracking information can be done. | 216 // For adding pages to history where no tracking information can be done. |
| 217 void AddPage(const GURL& url, base::Time time, VisitSource visit_source); | 217 void AddPage(const GURL& url, base::Time time, VisitSource visit_source); |
| 218 | 218 |
| 219 // All AddPage variants end up here. | 219 // All AddPage variants end up here. |
| 220 void AddPage(const HistoryAddPageArgs& add_page_args); | 220 void AddPage(const HistoryAddPageArgs& add_page_args); |
| 221 | 221 |
| 222 // Adds an entry for the specified url without creating a visit. This should | 222 // Adds an entry for the specified url without creating a visit. This should |
| 223 // only be used when bookmarking a page, otherwise the row leaks in the | 223 // only be used when bookmarking a page, otherwise the row leaks in the |
| 224 // history db (it never gets cleaned). | 224 // history db (it never gets cleaned). |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 | 859 |
| 860 // All vended weak pointers are invalidated in Cleanup(). | 860 // All vended weak pointers are invalidated in Cleanup(). |
| 861 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 861 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
| 862 | 862 |
| 863 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 863 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 864 }; | 864 }; |
| 865 | 865 |
| 866 } // namespace history | 866 } // namespace history |
| 867 | 867 |
| 868 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 868 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| OLD | NEW |