Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: components/download/public/download_params.h

Issue 2870753003: Add a Model to the download component. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_PUBLIC_DOWNLOAD_PARAMS_H_ 5 #ifndef COMPONENTS_DOWNLOAD_PUBLIC_DOWNLOAD_PARAMS_H_
6 #define COMPONENTS_DOWNLOAD_PUBLIC_DOWNLOAD_PARAMS_H_ 6 #define COMPONENTS_DOWNLOAD_PUBLIC_DOWNLOAD_PARAMS_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "components/download/public/clients.h" 10 #include "components/download/public/clients.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 UI = 3, 60 UI = 3,
61 61
62 // The default priority for all tasks unless overridden. 62 // The default priority for all tasks unless overridden.
63 DEFAULT = NORMAL, 63 DEFAULT = NORMAL,
64 }; 64 };
65 65
66 SchedulingParams(); 66 SchedulingParams();
67 SchedulingParams(const SchedulingParams& other) = default; 67 SchedulingParams(const SchedulingParams& other) = default;
68 ~SchedulingParams() = default; 68 ~SchedulingParams() = default;
69 69
70 // Cancel the download after this delay. Will cancel in-progress downloads. 70 // Cancel the download after this time. Will cancel in-progress downloads.
71 base::TimeDelta cancel_after; 71 base::Time cancel_time;
72 72
73 // The suggested priority. Non-UI priorities may not be honored by the 73 // The suggested priority. Non-UI priorities may not be honored by the
74 // DownloadService based on internal criteria and settings. 74 // DownloadService based on internal criteria and settings.
75 Priority priority; 75 Priority priority;
76 NetworkRequirements network_requirements; 76 NetworkRequirements network_requirements;
77 BatteryRequirements battery_requirements; 77 BatteryRequirements battery_requirements;
78 }; 78 };
79 79
80 // The parameters describing how to build the request when starting a download. 80 // The parameters describing how to build the request when starting a download.
81 struct RequestParams { 81 struct RequestParams {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // will occur. 126 // will occur.
127 SchedulingParams scheduling_params; 127 SchedulingParams scheduling_params;
128 128
129 // The parameters that define the actual download request to make. 129 // The parameters that define the actual download request to make.
130 RequestParams request_params; 130 RequestParams request_params;
131 }; 131 };
132 132
133 } // namespace download 133 } // namespace download
134 134
135 #endif // COMPONENTS_DOWNLOAD_PUBLIC_DOWNLOAD_PARAMS_H_ 135 #endif // COMPONENTS_DOWNLOAD_PUBLIC_DOWNLOAD_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698