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

Side by Side Diff: components/metrics/cloned_install_detector_unittest.cc

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « components/metrics/cloned_install_detector.cc ('k') | components/metrics/daily_event.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/metrics/cloned_install_detector.h" 5 #include "components/metrics/cloned_install_detector.h"
6 6
7 #include "base/prefs/testing_pref_service.h"
7 #include "components/metrics/machine_id_provider.h" 8 #include "components/metrics/machine_id_provider.h"
8 #include "components/metrics/metrics_pref_names.h" 9 #include "components/metrics/metrics_pref_names.h"
9 #include "components/metrics/metrics_state_manager.h" 10 #include "components/metrics/metrics_state_manager.h"
10 #include "components/prefs/testing_pref_service.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace metrics { 13 namespace metrics {
14 14
15 namespace { 15 namespace {
16 16
17 const std::string kTestRawId = "test"; 17 const std::string kTestRawId = "test";
18 // Hashed machine id for |kTestRawId|. 18 // Hashed machine id for |kTestRawId|.
19 const int kTestHashedId = 2216819; 19 const int kTestHashedId = 2216819;
20 20
(...skipping 23 matching lines...) Expand all
44 44
45 scoped_ptr<ClonedInstallDetector> detector( 45 scoped_ptr<ClonedInstallDetector> detector(
46 new ClonedInstallDetector(MachineIdProvider::CreateInstance())); 46 new ClonedInstallDetector(MachineIdProvider::CreateInstance()));
47 47
48 detector->SaveMachineId(&prefs, kTestRawId); 48 detector->SaveMachineId(&prefs, kTestRawId);
49 49
50 EXPECT_TRUE(prefs.GetBoolean(prefs::kMetricsResetIds)); 50 EXPECT_TRUE(prefs.GetBoolean(prefs::kMetricsResetIds));
51 } 51 }
52 52
53 } // namespace metrics 53 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/cloned_install_detector.cc ('k') | components/metrics/daily_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698