| 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 CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ | 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ |
| 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ | 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 explicit HistoryAdapter(history::HistoryService* history); | 35 explicit HistoryAdapter(history::HistoryService* history); |
| 36 virtual ~HistoryAdapter(); | 36 virtual ~HistoryAdapter(); |
| 37 | 37 |
| 38 virtual void QueryDownloads( | 38 virtual void QueryDownloads( |
| 39 const history::HistoryService::DownloadQueryCallback& callback); | 39 const history::HistoryService::DownloadQueryCallback& callback); |
| 40 | 40 |
| 41 virtual void CreateDownload( | 41 virtual void CreateDownload( |
| 42 const history::DownloadRow& info, | 42 const history::DownloadRow& info, |
| 43 const history::HistoryService::DownloadCreateCallback& callback); | 43 const history::HistoryService::DownloadCreateCallback& callback); |
| 44 | 44 |
| 45 virtual void UpdateDownload(const history::DownloadRow& data); | 45 virtual void UpdateDownload(const history::DownloadRow& data, |
| 46 bool should_commit_immediately); |
| 46 | 47 |
| 47 virtual void RemoveDownloads(const std::set<uint32_t>& ids); | 48 virtual void RemoveDownloads(const std::set<uint32_t>& ids); |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 history::HistoryService* history_; | 51 history::HistoryService* history_; |
| 51 DISALLOW_COPY_AND_ASSIGN(HistoryAdapter); | 52 DISALLOW_COPY_AND_ASSIGN(HistoryAdapter); |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 class Observer { | 55 class Observer { |
| 55 public: | 56 public: |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 bool initial_history_query_complete_; | 158 bool initial_history_query_complete_; |
| 158 | 159 |
| 159 base::ObserverList<Observer> observers_; | 160 base::ObserverList<Observer> observers_; |
| 160 | 161 |
| 161 base::WeakPtrFactory<DownloadHistory> weak_ptr_factory_; | 162 base::WeakPtrFactory<DownloadHistory> weak_ptr_factory_; |
| 162 | 163 |
| 163 DISALLOW_COPY_AND_ASSIGN(DownloadHistory); | 164 DISALLOW_COPY_AND_ASSIGN(DownloadHistory); |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ | 167 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ |
| OLD | NEW |