| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 std::vector<BrowsingHistoryHandler::HistoryEntry>* results); | 143 std::vector<BrowsingHistoryHandler::HistoryEntry>* results); |
| 144 | 144 |
| 145 protected: | 145 protected: |
| 146 // Callback from the history system when a history query has completed. | 146 // Callback from the history system when a history query has completed. |
| 147 // Exposed for testing. | 147 // Exposed for testing. |
| 148 void QueryComplete(const base::string16& search_text, | 148 void QueryComplete(const base::string16& search_text, |
| 149 const history::QueryOptions& options, | 149 const history::QueryOptions& options, |
| 150 history::QueryResults* results); | 150 history::QueryResults* results); |
| 151 | 151 |
| 152 private: | 152 private: |
| 153 FRIEND_TEST_ALL_PREFIXES(BrowsingHistoryHandlerTest, |
| 154 ObservingWebHistoryDeletions); |
| 155 |
| 153 // The range for which to return results: | 156 // The range for which to return results: |
| 154 // - ALLTIME: allows access to all the results in a paginated way. | 157 // - ALLTIME: allows access to all the results in a paginated way. |
| 155 // - WEEK: the last 7 days. | 158 // - WEEK: the last 7 days. |
| 156 // - MONTH: the last calendar month. | 159 // - MONTH: the last calendar month. |
| 157 enum Range { | 160 enum Range { |
| 158 ALL_TIME = 0, | 161 ALL_TIME = 0, |
| 159 WEEK = 1, | 162 WEEK = 1, |
| 160 MONTH = 2 | 163 MONTH = 2 |
| 161 }; | 164 }; |
| 162 | 165 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 260 |
| 258 // Whether there are other forms of browsing history on the history server. | 261 // Whether there are other forms of browsing history on the history server. |
| 259 bool has_other_forms_of_browsing_history_; | 262 bool has_other_forms_of_browsing_history_; |
| 260 | 263 |
| 261 base::WeakPtrFactory<BrowsingHistoryHandler> weak_factory_; | 264 base::WeakPtrFactory<BrowsingHistoryHandler> weak_factory_; |
| 262 | 265 |
| 263 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler); | 266 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryHandler); |
| 264 }; | 267 }; |
| 265 | 268 |
| 266 #endif // CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ | 269 #endif // CHROME_BROWSER_UI_WEBUI_BROWSING_HISTORY_HANDLER_H_ |
| OLD | NEW |