| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // This class pairs with DownloadController on Java side to forward requests | 5 // This class pairs with DownloadController on Java side to forward requests |
| 6 // for GET downloads to the current DownloadListener. POST downloads are | 6 // for GET downloads to the current DownloadListener. POST downloads are |
| 7 // handled on the native side. | 7 // handled on the native side. |
| 8 // | 8 // |
| 9 // Both classes are Singleton classes. C++ object owns Java object. | 9 // Both classes are Singleton classes. C++ object owns Java object. |
| 10 // | 10 // |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // UMA histogram enum for download cancellation reasons. Keep this | 53 // UMA histogram enum for download cancellation reasons. Keep this |
| 54 // in sync with MobileDownloadCancelReason in histograms.xml. This should be | 54 // in sync with MobileDownloadCancelReason in histograms.xml. This should be |
| 55 // append only. | 55 // append only. |
| 56 enum DownloadCancelReason { | 56 enum DownloadCancelReason { |
| 57 CANCEL_REASON_NOT_CANCELED = 0, | 57 CANCEL_REASON_NOT_CANCELED = 0, |
| 58 CANCEL_REASON_ACTION_BUTTON, | 58 CANCEL_REASON_ACTION_BUTTON, |
| 59 CANCEL_REASON_NOTIFICATION_DISMISSED, | 59 CANCEL_REASON_NOTIFICATION_DISMISSED, |
| 60 CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED, | 60 CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED, |
| 61 CANCEL_REASON_NO_STORAGE_PERMISSION, | 61 CANCEL_REASON_NO_STORAGE_PERMISSION, |
| 62 CANCEL_REASON_DANGEROUS_DOWNLOAD_INFOBAR_DISMISSED, | 62 CANCEL_REASON_DANGEROUS_DOWNLOAD_INFOBAR_DISMISSED, |
| 63 CANCEL_REASON_NO_EXTERNAL_STORAGE, |
| 64 CANCEL_REASON_CANNOT_DETERMINE_DOWNLOAD_TARGET, |
| 63 CANCEL_REASON_MAX | 65 CANCEL_REASON_MAX |
| 64 }; | 66 }; |
| 65 static void RecordDownloadCancelReason(DownloadCancelReason reason); | 67 static void RecordDownloadCancelReason(DownloadCancelReason reason); |
| 66 | 68 |
| 67 private: | 69 private: |
| 68 struct JavaObject; | 70 struct JavaObject; |
| 69 friend struct base::DefaultSingletonTraits<DownloadController>; | 71 friend struct base::DefaultSingletonTraits<DownloadController>; |
| 70 DownloadController(); | 72 DownloadController(); |
| 71 ~DownloadController() override; | 73 ~DownloadController() override; |
| 72 | 74 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 JavaObject* GetJavaObject(); | 112 JavaObject* GetJavaObject(); |
| 111 | 113 |
| 112 JavaObject* java_object_; | 114 JavaObject* java_object_; |
| 113 | 115 |
| 114 std::string default_file_name_; | 116 std::string default_file_name_; |
| 115 | 117 |
| 116 DISALLOW_COPY_AND_ASSIGN(DownloadController); | 118 DISALLOW_COPY_AND_ASSIGN(DownloadController); |
| 117 }; | 119 }; |
| 118 | 120 |
| 119 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_H_ | 121 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_DOWNLOAD_CONTROLLER_H_ |
| OLD | NEW |