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

Unified Diff: net/reporting/reporting_test_util.cc

Issue 2740833004: Reporting: Implement garbage collector. (Closed)
Patch Set: rebase Created 3 years, 8 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
« net/reporting/reporting_context.h ('K') | « net/reporting/reporting_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/reporting/reporting_test_util.cc
diff --git a/net/reporting/reporting_test_util.cc b/net/reporting/reporting_test_util.cc
index afc2c274369a82012aa9e0a3ca12e5c17564ff1d..6c23f4185228ef32b6b0e1ce49f38ac5393cdc74 100644
--- a/net/reporting/reporting_test_util.cc
+++ b/net/reporting/reporting_test_util.cc
@@ -13,6 +13,7 @@
#include "base/memory/ptr_util.h"
#include "base/test/simple_test_clock.h"
#include "base/test/simple_test_tick_clock.h"
+#include "base/timer/mock_timer.h"
#include "net/reporting/reporting_cache.h"
#include "net/reporting/reporting_client.h"
#include "net/reporting/reporting_context.h"
@@ -119,9 +120,14 @@ TestReportingContext::TestReportingContext(const ReportingPolicy& policy)
test_delegate_(new TestReportingDelegate()),
test_clock_(new base::SimpleTestClock()),
test_tick_clock_(new base::SimpleTestTickClock()),
+ test_garbage_collection_timer_(
+ new base::MockTimer(/* retain_user_task= */ false,
+ /* is_repeating= */ false)),
test_uploader_(new TestReportingUploader()) {
Init(base::WrapUnique(test_delegate_), base::WrapUnique(test_clock_),
- base::WrapUnique(test_tick_clock_), base::WrapUnique(test_uploader_));
+ base::WrapUnique(test_tick_clock_),
+ base::WrapUnique(test_garbage_collection_timer_),
+ base::WrapUnique(test_uploader_));
}
TestReportingContext::~TestReportingContext() {}
« net/reporting/reporting_context.h ('K') | « net/reporting/reporting_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698