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

Unified Diff: components/offline_pages/offline_page_model_unittest.cc

Issue 1976163004: [Offline Pages] Adds Rappor metrics measuring what domains are saved & viewed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-store
Patch Set: Created 4 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 | « components/offline_pages/offline_page_model.cc ('k') | tools/metrics/rappor/rappor.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/offline_page_model_unittest.cc
diff --git a/components/offline_pages/offline_page_model_unittest.cc b/components/offline_pages/offline_page_model_unittest.cc
index 3179a253a42b99f29b0ab0e30a58ae93bf473de9..3dec15a8a72ec3694dae99e79c700e08d82dfd8f 100644
--- a/components/offline_pages/offline_page_model_unittest.cc
+++ b/components/offline_pages/offline_page_model_unittest.cc
@@ -13,6 +13,7 @@
#include "base/feature_list.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
+#include "base/memory/weak_ptr.h"
#include "base/optional.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
@@ -32,6 +33,10 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
+namespace rappor {
+class RapporService;
+}
+
namespace offline_pages {
namespace {
@@ -265,8 +270,10 @@ std::unique_ptr<OfflinePageMetadataStore> OfflinePageModelTest::BuildStore() {
std::unique_ptr<OfflinePageModel> OfflinePageModelTest::BuildModel(
std::unique_ptr<OfflinePageMetadataStore> store) {
- return std::unique_ptr<OfflinePageModel>(new OfflinePageModel(
- std::move(store), temp_dir_.path(), base::ThreadTaskRunnerHandle::Get()));
+ return std::unique_ptr<OfflinePageModel>(
+ new OfflinePageModel(std::move(store), temp_dir_.path(),
+ base::WeakPtr<rappor::RapporService>(),
+ base::ThreadTaskRunnerHandle::Get()));
}
void OfflinePageModelTest::ResetModel() {
« no previous file with comments | « components/offline_pages/offline_page_model.cc ('k') | tools/metrics/rappor/rappor.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698