summaryrefslogtreecommitdiff
path: root/chromium/components/download/public/common/download_features.h
blob: 8713b77be766ee1159b2573036678b52e4d664f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_DOWNLOAD_PUBLIC_COMMON_DOWNLOAD_FEATURES_H_
#define COMPONENTS_DOWNLOAD_PUBLIC_COMMON_DOWNLOAD_FEATURES_H_

#include "base/feature_list.h"
#include "build/build_config.h"
#include "components/download/public/common/download_export.h"

namespace download {
namespace features {

// The Finch parameter for download later feature to function only on cellular
// network.
constexpr char kDownloadLaterRequireCellular[] = "require_cellular";

// The Finch parameter for download later feature to enable only in lite
// mode(data saver).
constexpr char kDownloadLaterRequireLiteMode[] = "require_lite_mode";

// Whether offline content provider should be used for the downloads UI..
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kUseDownloadOfflineContentProvider;

// Whether download auto-resumptions are enabled in native.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kDownloadAutoResumptionNative;

// Whether a download can be handled by parallel jobs.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature kParallelDownloading;

// Whether to enable download later feature.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature kDownloadLater;

#if defined(OS_ANDROID)
// Whether download expiration date will be refreshed on resumption.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature kRefreshExpirationDate;

// Whether to enable smart suggestion for large downloads
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kSmartSuggestionForLargeDownloads;
#endif

// Whether in-progress download manager will be used to initialize download
// service.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kUseInProgressDownloadManagerForDownloadService;

// Whether download resumption is allowed when there are no strong validators.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kAllowDownloadResumptionWithoutStrongValidators;

// Whether parallel requests are used if server response doesn't reveal range
// support.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kUseParallelRequestsForUnknwonRangeSupport;

// Whether parallel download is used for HTTP2 connections.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kUseParallelRequestsForHTTP2;

// Whether parallel download is used for QUIC connections.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kUseParallelRequestsForQUIC;

// Whether to delete expired download.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature kDeleteExpiredDownloads;

// Whether to delete downloads that are overwritten by others.
COMPONENTS_DOWNLOAD_EXPORT extern const base::Feature
    kDeleteOverwrittenDownloads;

}  // namespace features

namespace switches {

// If set, show the download later dialog without the requirement of being on
// cellular network.
COMPONENTS_DOWNLOAD_EXPORT extern const char kDownloadLaterDebugOnWifi[];

}  // namespace switches

}  // namespace download

#endif  // COMPONENTS_DOWNLOAD_PUBLIC_COMMON_DOWNLOAD_FEATURES_H_