summaryrefslogtreecommitdiff
path: root/chromium/components/update_client/network.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-29 10:46:47 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-02 12:02:10 +0000
commit99677208ff3b216fdfec551fbe548da5520cd6fb (patch)
tree476a4865c10320249360e859d8fdd3e01833b03a /chromium/components/update_client/network.h
parentc30a6232df03e1efbd9f3b226777b07e087a1122 (diff)
downloadqtwebengine-chromium-99677208ff3b216fdfec551fbe548da5520cd6fb.tar.gz
BASELINE: Update Chromium to 86.0.4240.124
Change-Id: Ide0ff151e94cd665ae6521a446995d34a9d1d644 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/update_client/network.h')
-rw-r--r--chromium/components/update_client/network.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/chromium/components/update_client/network.h b/chromium/components/update_client/network.h
index 4afce03df36..442dd24b2f9 100644
--- a/chromium/components/update_client/network.h
+++ b/chromium/components/update_client/network.h
@@ -31,6 +31,7 @@ class NetworkFetcher {
base::OnceCallback<void(std::unique_ptr<std::string> response_body,
int net_error,
const std::string& header_etag,
+ const std::string& header_x_cup_server_proof,
int64_t xheader_retry_after_sec)>;
using DownloadToFileCompleteCallback =
base::OnceCallback<void(int net_error, int64_t content_size)>;
@@ -38,9 +39,11 @@ class NetworkFetcher {
base::OnceCallback<void(int response_code, int64_t content_length)>;
using ProgressCallback = base::RepeatingCallback<void(int64_t current)>;
- // The ETag header carries the ECSDA signature of the POST response, if
- // signing has been used.
+ // The following two headers carry the ECSDA signature of the POST response,
+ // if signing has been used. Two headers are used for redundancy purposes.
+ // The value of the `X-Cup-Server-Proof` is preferred.
static constexpr char kHeaderEtag[] = "ETag";
+ static constexpr char kHeaderXCupServerProof[] = "X-Cup-Server-Proof";
// The server uses the optional X-Retry-After header to indicate that the
// current request should not be attempted again.
@@ -74,12 +77,13 @@ class NetworkFetcher {
DISALLOW_COPY_AND_ASSIGN(NetworkFetcher);
};
-class NetworkFetcherFactory : public base::RefCounted<NetworkFetcherFactory> {
+class NetworkFetcherFactory
+ : public base::RefCountedThreadSafe<NetworkFetcherFactory> {
public:
virtual std::unique_ptr<NetworkFetcher> Create() const = 0;
protected:
- friend class base::RefCounted<NetworkFetcherFactory>;
+ friend class base::RefCountedThreadSafe<NetworkFetcherFactory>;
NetworkFetcherFactory() = default;
virtual ~NetworkFetcherFactory() = default;