Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: net/reporting/reporting_service.cc

Issue 2769083005: Reporting: Set up in ProfileImplIOData. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/reporting/reporting_persister_unittest.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/reporting/reporting_persister_unittest.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698