| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 jobject obj, | 66 jobject obj, |
| 67 const JavaParamRef<jstring>& jdownload_guid, | 67 const JavaParamRef<jstring>& jdownload_guid, |
| 68 bool is_off_the_record); | 68 bool is_off_the_record); |
| 69 | 69 |
| 70 // Called to request that the DownloadManagerService return data about all | 70 // Called to request that the DownloadManagerService return data about all |
| 71 // downloads in the user's history. | 71 // downloads in the user's history. |
| 72 void GetAllDownloads(JNIEnv* env, | 72 void GetAllDownloads(JNIEnv* env, |
| 73 const JavaParamRef<jobject>& obj, | 73 const JavaParamRef<jobject>& obj, |
| 74 bool is_off_the_record); | 74 bool is_off_the_record); |
| 75 | 75 |
| 76 // Called to check if the files associated with any downloads have been |
| 77 // removed by an external action. |
| 78 void CheckForExternallyRemovedDownloads(JNIEnv* env, |
| 79 const JavaParamRef<jobject>& obj, |
| 80 bool is_off_the_record); |
| 81 |
| 76 // DownloadHistory::Observer methods. | 82 // DownloadHistory::Observer methods. |
| 77 void OnHistoryQueryComplete() override; | 83 void OnHistoryQueryComplete() override; |
| 78 | 84 |
| 79 // AllDownloadItemNotifier::Observer methods. | 85 // AllDownloadItemNotifier::Observer methods. |
| 80 void OnDownloadUpdated(content::DownloadManager* manager, | 86 void OnDownloadUpdated(content::DownloadManager* manager, |
| 81 content::DownloadItem* item) override; | 87 content::DownloadItem* item) override; |
| 82 void OnDownloadRemoved(content::DownloadManager* manager, | 88 void OnDownloadRemoved(content::DownloadManager* manager, |
| 83 content::DownloadItem* item) override; | 89 content::DownloadItem* item) override; |
| 84 | 90 |
| 85 protected: | 91 protected: |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 147 |
| 142 ResumeCallback resume_callback_for_testing_; | 148 ResumeCallback resume_callback_for_testing_; |
| 143 | 149 |
| 144 std::unique_ptr<AllDownloadItemNotifier> original_notifier_; | 150 std::unique_ptr<AllDownloadItemNotifier> original_notifier_; |
| 145 std::unique_ptr<AllDownloadItemNotifier> off_the_record_notifier_; | 151 std::unique_ptr<AllDownloadItemNotifier> off_the_record_notifier_; |
| 146 | 152 |
| 147 DISALLOW_COPY_AND_ASSIGN(DownloadManagerService); | 153 DISALLOW_COPY_AND_ASSIGN(DownloadManagerService); |
| 148 }; | 154 }; |
| 149 | 155 |
| 150 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ | 156 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ |
| OLD | NEW |