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

Unified Diff: net/reporting/reporting_context.cc

Issue 2891133003: Reporting: Wire ReportingDelegate into ChromeNetworkDelegate (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/reporting/reporting_context.h ('k') | net/reporting/reporting_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/reporting/reporting_context.cc
diff --git a/net/reporting/reporting_context.cc b/net/reporting/reporting_context.cc
index 6519e621da35e5d54c90fe1fc091ccf2ccd9f3b7..6a974e29b2e43e8b31bfdecd02327def426acd4c 100644
--- a/net/reporting/reporting_context.cc
+++ b/net/reporting/reporting_context.cc
@@ -39,7 +39,8 @@ class ReportingContextImpl : public ReportingContext {
: ReportingContext(policy,
base::MakeUnique<base::DefaultClock>(),
base::MakeUnique<base::DefaultTickClock>(),
- ReportingUploader::Create(request_context)) {}
+ ReportingUploader::Create(request_context),
+ ReportingDelegate::Create(request_context)) {}
};
} // namespace
@@ -71,12 +72,13 @@ void ReportingContext::NotifyCacheUpdated() {
ReportingContext::ReportingContext(const ReportingPolicy& policy,
std::unique_ptr<base::Clock> clock,
std::unique_ptr<base::TickClock> tick_clock,
- std::unique_ptr<ReportingUploader> uploader)
+ std::unique_ptr<ReportingUploader> uploader,
+ std::unique_ptr<ReportingDelegate> delegate)
: policy_(policy),
clock_(std::move(clock)),
tick_clock_(std::move(tick_clock)),
uploader_(std::move(uploader)),
- delegate_(ReportingDelegate::Create()),
+ delegate_(std::move(delegate)),
cache_(base::MakeUnique<ReportingCache>(this)),
endpoint_manager_(base::MakeUnique<ReportingEndpointManager>(this)),
delivery_agent_(ReportingDeliveryAgent::Create(this)),
« no previous file with comments | « net/reporting/reporting_context.h ('k') | net/reporting/reporting_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698