OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_REPORTING_REPORTING_CLIENT_H_ |
| 6 #define NET_REPORTING_REPORTING_CLIENT_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/time/time.h" |
| 12 #include "net/base/net_export.h" |
| 13 #include "url/gurl.h" |
| 14 #include "url/origin.h" |
| 15 |
| 16 namespace net { |
| 17 |
| 18 // The configuration by an origin to use an endpoint for report delivery. |
| 19 struct NET_EXPORT ReportingClient { |
| 20 public: |
| 21 enum class Subdomains { EXCLUDE = 0, INCLUDE = 1 }; |
| 22 |
| 23 ReportingClient(const url::Origin& origin, |
| 24 const GURL& endpoint, |
| 25 Subdomains subdomains, |
| 26 const std::string& group, |
| 27 base::TimeTicks expires); |
| 28 ~ReportingClient(); |
| 29 |
| 30 // The origin from which reports will be delivered. |
| 31 url::Origin origin; |
| 32 |
| 33 // The endpoint to which reports may be delivered. (Origins may configure |
| 34 // many.) |
| 35 GURL endpoint; |
| 36 |
| 37 // Whether subdomains of the host of |origin| should also be handled by this |
| 38 // client. |
| 39 Subdomains subdomains = Subdomains::EXCLUDE; |
| 40 |
| 41 // The endpoint group to which this client belongs. |
| 42 std::string group = "default"; |
| 43 |
| 44 // When this client's max-age has expired. |
| 45 base::TimeTicks expires; |
| 46 |
| 47 private: |
| 48 DISALLOW_COPY_AND_ASSIGN(ReportingClient); |
| 49 }; |
| 50 |
| 51 } // namespace net |
| 52 |
| 53 #endif // NET_REPORTING_REPORTING_CLIENT_H_ |
OLD | NEW |