| 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_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ | 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 const JavaParamRef<jobject>& obj, | 91 const JavaParamRef<jobject>& obj, |
| 92 bool is_off_the_record); | 92 bool is_off_the_record); |
| 93 | 93 |
| 94 // Remove download items associated with |path| from downloads history. | 94 // Remove download items associated with |path| from downloads history. |
| 95 void RemoveDownloadsForPath(const base::FilePath& path); | 95 void RemoveDownloadsForPath(const base::FilePath& path); |
| 96 | 96 |
| 97 // DownloadHistory::Observer methods. | 97 // DownloadHistory::Observer methods. |
| 98 void OnHistoryQueryComplete() override; | 98 void OnHistoryQueryComplete() override; |
| 99 | 99 |
| 100 // AllDownloadItemNotifier::Observer methods. | 100 // AllDownloadItemNotifier::Observer methods. |
| 101 void OnDownloadCreated(content::DownloadManager* manager, |
| 102 content::DownloadItem* item) override; |
| 101 void OnDownloadUpdated(content::DownloadManager* manager, | 103 void OnDownloadUpdated(content::DownloadManager* manager, |
| 102 content::DownloadItem* item) override; | 104 content::DownloadItem* item) override; |
| 103 void OnDownloadRemoved(content::DownloadManager* manager, | 105 void OnDownloadRemoved(content::DownloadManager* manager, |
| 104 content::DownloadItem* item) override; | 106 content::DownloadItem* item) override; |
| 105 | 107 |
| 106 protected: | 108 protected: |
| 107 // Called to get the content::DownloadManager instance. | 109 // Called to get the content::DownloadManager instance. |
| 108 virtual content::DownloadManager* GetDownloadManager(bool is_off_the_record); | 110 virtual content::DownloadManager* GetDownloadManager(bool is_off_the_record); |
| 109 | 111 |
| 110 private: | 112 private: |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 | 170 |
| 169 ResumeCallback resume_callback_for_testing_; | 171 ResumeCallback resume_callback_for_testing_; |
| 170 | 172 |
| 171 std::unique_ptr<AllDownloadItemNotifier> original_notifier_; | 173 std::unique_ptr<AllDownloadItemNotifier> original_notifier_; |
| 172 std::unique_ptr<AllDownloadItemNotifier> off_the_record_notifier_; | 174 std::unique_ptr<AllDownloadItemNotifier> off_the_record_notifier_; |
| 173 | 175 |
| 174 DISALLOW_COPY_AND_ASSIGN(DownloadManagerService); | 176 DISALLOW_COPY_AND_ASSIGN(DownloadManagerService); |
| 175 }; | 177 }; |
| 176 | 178 |
| 177 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ | 179 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ |
| OLD | NEW |