blob: 30b28608aabc5e57a4b8888f34c68097b6fed56c [file] [log] [blame]
Alex Chaua76a6e32019-06-26 16:20:011// Copyright 2019 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "components/gcm_driver/web_push_sender.h"
6
7#include <limits.h>
8
9#include "base/base64url.h"
10#include "base/bind.h"
Richard Knoll1b846ce2019-07-24 09:37:1211#include "base/no_destructor.h"
Alex Chaua76a6e32019-06-26 16:20:0112#include "base/strings/string_number_conversions.h"
13#include "base/strings/stringprintf.h"
14#include "components/gcm_driver/common/gcm_message.h"
15#include "components/gcm_driver/crypto/json_web_token_util.h"
16#include "components/gcm_driver/crypto/p256_key_util.h"
Alex Chaua4abf92f2019-07-19 10:32:5617#include "components/gcm_driver/web_push_metrics.h"
Alex Chaua76a6e32019-06-26 16:20:0118#include "net/base/load_flags.h"
19#include "net/http/http_request_headers.h"
20#include "net/http/http_status_code.h"
21#include "services/network/public/cpp/cors/cors.h"
22#include "services/network/public/cpp/resource_request.h"
23#include "services/network/public/cpp/simple_url_loader.h"
24#include "url/gurl.h"
25
26namespace gcm {