blob: 0aa11bea57d485b82abb723100b678c4086007d2 [file] [log] [blame]
// Copyright 2017 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.
#include <string>
#include "base/macros.h"
#include "base/time/time.h"
#include "net/base/net_export.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace net {
// The configuration by an origin to use an endpoint for report delivery.
struct NET_EXPORT ReportingClient {
enum class Subdomains { EXCLUDE = 0, INCLUDE = 1 };
ReportingClient(const url::Origin& origin,
const GURL& endpoint,
Subdomains subdomains,
const std::string& group,
base::TimeTicks expires);
// The origin from which reports will be delivered.
url::Origin origin;
// The endpoint to which reports may be delivered. (Origins may configure
// many.)
GURL endpoint;
// Whether subdomains of the host of |origin| should also be handled by this
// client.
Subdomains subdomains = Subdomains::EXCLUDE;
// The endpoint group to which this client belongs.
std::string group = "default";
// When this client's max-age has expired.
base::TimeTicks expires;
} // namespace net