| Index: components/reporting/core/browser/reporting_endpoint.cc
|
| diff --git a/components/reporting/core/browser/reporting_endpoint.cc b/components/reporting/core/browser/reporting_endpoint.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5187d8b805b1fde69ed5c681691d643e11df07da
|
| --- /dev/null
|
| +++ b/components/reporting/core/browser/reporting_endpoint.cc
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2016 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 "components/reporting/core/browser/reporting_endpoint.h"
|
| +
|
| +namespace reporting {
|
| +
|
| +ReportingEndpoint::ReportingEndpoint(
|
| + const GURL& url,
|
| + const net::BackoffEntry::Policy& backoff_policy,
|
| + base::TimeTicks now)
|
| + : url(url), backoff(&backoff_policy), last_used(now) {}
|
| +ReportingEndpoint::~ReportingEndpoint() {}
|
| +
|
| +bool ReportingEndpoint::is_expired(base::TimeTicks now) const {
|
| + for (auto& pair : clients)
|
| + if (!pair.second.is_expired(now))
|
| + return false;
|
| + return true;
|
| +}
|
| +
|
| +} // namespace reporting
|
|
|