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

Side by Side Diff: components/ukm/test_ukm_service.cc

Issue 2617883004: Initial UKMPageLoadMetricsObserver (Closed)
Patch Set: Class rename Created 3 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/ukm/test_ukm_service.h"
6
7 namespace ukm {
8
9 UkmServiceTestingHarness::UkmServiceTestingHarness() {
10 UkmService::RegisterPrefs(test_prefs_.registry());
11 test_prefs_.ClearPref(prefs::kUkmClientId);
12 test_prefs_.ClearPref(prefs::kUkmPersistedLogs);
13
14 test_ukm_service_ = base::MakeUnique<TestUkmService>(&test_prefs_);
15 }
16
17 UkmServiceTestingHarness::~UkmServiceTestingHarness() = default;
18
19 TestUkmService::TestUkmService(PrefService* prefs_service)
20 : UkmService(prefs_service, &test_metrics_service_client_) {
21 DisableReporting();
22 }
23
24 TestUkmService::~TestUkmService() = default;
25
26 const UkmSource* TestUkmService::GetSource(size_t source_num) const {
27 return sources_for_testing()[source_num].get();
28 }
29
30 } // namespace ukm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698