OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/reporting/reporting_service.h" | 5 #include "net/reporting/reporting_service.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/bind.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/time/tick_clock.h" | 12 #include "base/time/tick_clock.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "net/reporting/reporting_cache.h" | 15 #include "net/reporting/reporting_cache.h" |
16 #include "net/reporting/reporting_context.h" | 16 #include "net/reporting/reporting_context.h" |
17 #include "net/reporting/reporting_header_parser.h" | 17 #include "net/reporting/reporting_header_parser.h" |
| 18 #include "net/reporting/reporting_persister.h" |
18 #include "url/gurl.h" | 19 #include "url/gurl.h" |
19 | 20 |
20 namespace net { | 21 namespace net { |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 class ReportingServiceImpl : public ReportingService { | 25 class ReportingServiceImpl : public ReportingService { |
25 public: | 26 public: |
26 ReportingServiceImpl(std::unique_ptr<ReportingContext> context) | 27 ReportingServiceImpl(std::unique_ptr<ReportingContext> context) |
27 : context_(std::move(context)) {} | 28 : context_(std::move(context)) {} |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 ReportingContext::Create(policy, request_context)); | 60 ReportingContext::Create(policy, request_context)); |
60 } | 61 } |
61 | 62 |
62 // static | 63 // static |
63 std::unique_ptr<ReportingService> ReportingService::CreateForTesting( | 64 std::unique_ptr<ReportingService> ReportingService::CreateForTesting( |
64 std::unique_ptr<ReportingContext> reporting_context) { | 65 std::unique_ptr<ReportingContext> reporting_context) { |
65 return base::MakeUnique<ReportingServiceImpl>(std::move(reporting_context)); | 66 return base::MakeUnique<ReportingServiceImpl>(std::move(reporting_context)); |
66 } | 67 } |
67 | 68 |
68 } // namespace net | 69 } // namespace net |
OLD | NEW |