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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void GetAllDownloads(JNIEnv* env, | 87 void GetAllDownloads(JNIEnv* env, |
88 const JavaParamRef<jobject>& obj, | 88 const JavaParamRef<jobject>& obj, |
89 bool is_off_the_record); | 89 bool is_off_the_record); |
90 | 90 |
91 // Called to check if the files associated with any downloads have been | 91 // Called to check if the files associated with any downloads have been |
92 // removed by an external action. | 92 // removed by an external action. |
93 void CheckForExternallyRemovedDownloads(JNIEnv* env, | 93 void CheckForExternallyRemovedDownloads(JNIEnv* env, |
94 const JavaParamRef<jobject>& obj, | 94 const JavaParamRef<jobject>& obj, |
95 bool is_off_the_record); | 95 bool is_off_the_record); |
96 | 96 |
| 97 // Called to update the last access time associated with a download. |
| 98 void UpdateLastAccessTime(JNIEnv* env, |
| 99 const JavaParamRef<jobject>& obj, |
| 100 const JavaParamRef<jstring>& jdownload_guid, |
| 101 bool is_off_the_record); |
| 102 |
97 // DownloadHistory::Observer methods. | 103 // DownloadHistory::Observer methods. |
98 void OnHistoryQueryComplete() override; | 104 void OnHistoryQueryComplete() override; |
99 | 105 |
100 // AllDownloadItemNotifier::Observer methods. | 106 // AllDownloadItemNotifier::Observer methods. |
101 void OnDownloadCreated(content::DownloadManager* manager, | 107 void OnDownloadCreated(content::DownloadManager* manager, |
102 content::DownloadItem* item) override; | 108 content::DownloadItem* item) override; |
103 void OnDownloadUpdated(content::DownloadManager* manager, | 109 void OnDownloadUpdated(content::DownloadManager* manager, |
104 content::DownloadItem* item) override; | 110 content::DownloadItem* item) override; |
105 void OnDownloadRemoved(content::DownloadManager* manager, | 111 void OnDownloadRemoved(content::DownloadManager* manager, |
106 content::DownloadItem* item) override; | 112 content::DownloadItem* item) override; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 176 |
171 ResumeCallback resume_callback_for_testing_; | 177 ResumeCallback resume_callback_for_testing_; |
172 | 178 |
173 std::unique_ptr<AllDownloadItemNotifier> original_notifier_; | 179 std::unique_ptr<AllDownloadItemNotifier> original_notifier_; |
174 std::unique_ptr<AllDownloadItemNotifier> off_the_record_notifier_; | 180 std::unique_ptr<AllDownloadItemNotifier> off_the_record_notifier_; |
175 | 181 |
176 DISALLOW_COPY_AND_ASSIGN(DownloadManagerService); | 182 DISALLOW_COPY_AND_ASSIGN(DownloadManagerService); |
177 }; | 183 }; |
178 | 184 |
179 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ | 185 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_MANAGER_SERVICE_H_ |
OLD | NEW |