OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_ |
6 #define CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_ | 6 #define CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // Core implementation of history querying. | 138 // Core implementation of history querying. |
139 void QueryHistory(const base::string16& search_text, | 139 void QueryHistory(const base::string16& search_text, |
140 const history::QueryOptions& options); | 140 const history::QueryOptions& options); |
141 | 141 |
142 // Removes |items| from history. | 142 // Removes |items| from history. |
143 void RemoveVisits( | 143 void RemoveVisits( |
144 std::vector<std::unique_ptr<BrowsingHistoryService::HistoryEntry>>* | 144 std::vector<std::unique_ptr<BrowsingHistoryService::HistoryEntry>>* |
145 items); | 145 items); |
146 | 146 |
147 // SyncServiceObserver implementation. | 147 // SyncServiceObserver implementation. |
148 void OnStateChanged() override; | 148 void OnStateChanged(syncer::SyncService* sync) override; |
149 | 149 |
150 // Merges duplicate entries from the query results, only retaining the most | 150 // Merges duplicate entries from the query results, only retaining the most |
151 // recent visit to a URL on a particular day. That visit contains the | 151 // recent visit to a URL on a particular day. That visit contains the |
152 // timestamps of the other visits. | 152 // timestamps of the other visits. |
153 static void MergeDuplicateResults( | 153 static void MergeDuplicateResults( |
154 std::vector<BrowsingHistoryService::HistoryEntry>* results); | 154 std::vector<BrowsingHistoryService::HistoryEntry>* results); |
155 | 155 |
156 // Callback from the history system when a history query has completed. | 156 // Callback from the history system when a history query has completed. |
157 // Exposed for testing. | 157 // Exposed for testing. |
158 void QueryComplete(const base::string16& search_text, | 158 void QueryComplete(const base::string16& search_text, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 // The clock used to vend times. | 253 // The clock used to vend times. |
254 std::unique_ptr<base::Clock> clock_; | 254 std::unique_ptr<base::Clock> clock_; |
255 | 255 |
256 base::WeakPtrFactory<BrowsingHistoryService> weak_factory_; | 256 base::WeakPtrFactory<BrowsingHistoryService> weak_factory_; |
257 | 257 |
258 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryService); | 258 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryService); |
259 }; | 259 }; |
260 | 260 |
261 #endif // CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_ | 261 #endif // CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_ |
OLD | NEW |