| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_DOWNLOAD_INTERNAL_ENTRY_H_ | 5 #ifndef COMPONENTS_DOWNLOAD_INTERNAL_ENTRY_H_ |
| 6 #define COMPONENTS_DOWNLOAD_INTERNAL_ENTRY_H_ | 6 #define COMPONENTS_DOWNLOAD_INTERNAL_ENTRY_H_ |
| 7 | 7 |
| 8 #include "components/download/public/client.h" | 8 #include "components/download/public/client.h" |
| 9 #include "components/download/public/clients.h" | 9 #include "components/download/public/clients.h" |
| 10 #include "components/download/public/download_params.h" | 10 #include "components/download/public/download_params.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // failed, could have succeeded, etc.). It is ready to have UMA logs saved. | 36 // failed, could have succeeded, etc.). It is ready to have UMA logs saved. |
| 37 COMPLETE = 4, | 37 COMPLETE = 4, |
| 38 | 38 |
| 39 // The download is finished. We are leaving this entry around to make sure | 39 // The download is finished. We are leaving this entry around to make sure |
| 40 // the files on disk are cleaned up. | 40 // the files on disk are cleaned up. |
| 41 WATCHDOG = 5, | 41 WATCHDOG = 5, |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 Entry(); | 44 Entry(); |
| 45 Entry(const Entry& other); | 45 Entry(const Entry& other); |
| 46 explicit Entry(const DownloadParams& params); |
| 46 ~Entry(); | 47 ~Entry(); |
| 47 | 48 |
| 48 // The feature that is requesting this download. | 49 // The feature that is requesting this download. |
| 49 DownloadClient client = DownloadClient::INVALID; | 50 DownloadClient client = DownloadClient::INVALID; |
| 50 | 51 |
| 51 // A unique GUID that represents this download. See | base::GenerateGUID()|. | 52 // A unique GUID that represents this download. See | base::GenerateGUID()|. |
| 52 std::string guid; | 53 std::string guid; |
| 53 | 54 |
| 54 // The parameters that determine under what device conditions this download | 55 // The parameters that determine under what device conditions this download |
| 55 // will occur. | 56 // will occur. |
| 56 SchedulingParams scheduling_params; | 57 SchedulingParams scheduling_params; |
| 57 | 58 |
| 58 // The parameters that define the actual download request to make. | 59 // The parameters that define the actual download request to make. |
| 59 RequestParams request_params; | 60 RequestParams request_params; |
| 60 | 61 |
| 61 // The state of the download to help the scheduler and loggers make the right | 62 // The state of the download to help the scheduler and loggers make the right |
| 62 // decisions about the download object. | 63 // decisions about the download object. |
| 63 State state = State::NEW; | 64 State state = State::NEW; |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 } // namespace download | 67 } // namespace download |
| 67 | 68 |
| 68 #endif // COMPONENTS_DOWNLOAD_INTERNAL_ENTRY_H_ | 69 #endif // COMPONENTS_DOWNLOAD_INTERNAL_ENTRY_H_ |
| OLD | NEW |