| 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_CONFIG_H_ | 5 #ifndef COMPONENTS_DOWNLOAD_INTERNAL_CONFIG_H_ |
| 6 #define COMPONENTS_DOWNLOAD_INTERNAL_CONFIG_H_ | 6 #define COMPONENTS_DOWNLOAD_INTERNAL_CONFIG_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // Loaded based on experiment parameters from the server. Use default values if | 32 // Loaded based on experiment parameters from the server. Use default values if |
| 33 // no server configuration was detected. | 33 // no server configuration was detected. |
| 34 struct Configuration { | 34 struct Configuration { |
| 35 public: | 35 public: |
| 36 // Create the configuration. | 36 // Create the configuration. |
| 37 static std::unique_ptr<Configuration> CreateFromFinch(); | 37 static std::unique_ptr<Configuration> CreateFromFinch(); |
| 38 Configuration(); | 38 Configuration(); |
| 39 | 39 |
| 40 // The maximum number of downloads the DownloadService can have currently in | 40 // The maximum number of downloads the DownloadService can have currently in |
| 41 // Active or Paused states. | 41 // Active or Paused states. |
| 42 int max_concurrent_downloads; | 42 uint32_t max_concurrent_downloads; |
| 43 | 43 |
| 44 // The maximum number of downloads the DownloadService can have currently in | 44 // The maximum number of downloads the DownloadService can have currently in |
| 45 // only Active state. | 45 // only Active state. |
| 46 int max_running_downloads; | 46 uint32_t max_running_downloads; |
| 47 | 47 |
| 48 // The maximum number of downloads that are scheduled but not yet in Active | 48 // The maximum number of downloads that are scheduled but not yet in Active |
| 49 // state, for each client using the download service. | 49 // state, for each client using the download service. |
| 50 int max_scheduled_downloads; | 50 uint32_t max_scheduled_downloads; |
| 51 | 51 |
| 52 // The maximum number of retries before the download is aborted. | 52 // The maximum number of retries before the download is aborted. |
| 53 int max_retry_count; | 53 uint32_t max_retry_count; |
| 54 | 54 |
| 55 // The time that the download service will keep the files around before | 55 // The time that the download service will keep the files around before |
| 56 // deleting them if the client hasn't handle the files. | 56 // deleting them if the client hasn't handle the files. |
| 57 base::TimeDelta file_keep_alive_time; | 57 base::TimeDelta file_keep_alive_time; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 DISALLOW_COPY_AND_ASSIGN(Configuration); | 60 DISALLOW_COPY_AND_ASSIGN(Configuration); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace download | 63 } // namespace download |
| 64 | 64 |
| 65 #endif // COMPONENTS_DOWNLOAD_INTERNAL_CONFIG_H_ | 65 #endif // COMPONENTS_DOWNLOAD_INTERNAL_CONFIG_H_ |
| OLD | NEW |