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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 void AddPage(const HistoryAddPageArgs& add_page_args); | 189 void AddPage(const HistoryAddPageArgs& add_page_args); |
190 | 190 |
191 // Adds an entry for the specified url without creating a visit. This should | 191 // Adds an entry for the specified url without creating a visit. This should |
192 // only be used when bookmarking a page, otherwise the row leaks in the | 192 // only be used when bookmarking a page, otherwise the row leaks in the |
193 // history db (it never gets cleaned). | 193 // history db (it never gets cleaned). |
194 void AddPageNoVisitForBookmark(const GURL& url, const base::string16& title); | 194 void AddPageNoVisitForBookmark(const GURL& url, const base::string16& title); |
195 | 195 |
196 // Sets the title for the given page. The page should be in history. If it | 196 // Sets the title for the given page. The page should be in history. If it |
197 // is not, this operation is ignored. | 197 // is not, this operation is ignored. |
198 void SetPageTitle(const GURL& url, const base::string16& title); | 198 void SetPageTitle(const GURL& url, const base::string16& title); |
| 199 void SetPageHistoryContext(const GURL& url, HistoryContext context); |
199 | 200 |
200 // Updates the history database with a page's ending time stamp information. | 201 // Updates the history database with a page's ending time stamp information. |
201 // The page can be identified by the combination of the context id, the | 202 // The page can be identified by the combination of the context id, the |
202 // navigation entry id and the url. | 203 // navigation entry id and the url. |
203 void UpdateWithPageEndTime(ContextID context_id, | 204 void UpdateWithPageEndTime(ContextID context_id, |
204 int nav_entry_id, | 205 int nav_entry_id, |
205 const GURL& url, | 206 const GURL& url, |
206 base::Time end_ts); | 207 base::Time end_ts); |
207 | 208 |
208 // Querying ------------------------------------------------------------------ | 209 // Querying ------------------------------------------------------------------ |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 | 806 |
806 // All vended weak pointers are invalidated in Cleanup(). | 807 // All vended weak pointers are invalidated in Cleanup(). |
807 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 808 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
808 | 809 |
809 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 810 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
810 }; | 811 }; |
811 | 812 |
812 } // namespace history | 813 } // namespace history |
813 | 814 |
814 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 815 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
OLD | NEW |