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

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

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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
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/metrics_service.h" 5 #include "components/metrics/metrics_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 MetricsServiceTest() : is_metrics_reporting_enabled_(false) { 92 MetricsServiceTest() : is_metrics_reporting_enabled_(false) {
93 MetricsService::RegisterPrefs(testing_local_state_.registry()); 93 MetricsService::RegisterPrefs(testing_local_state_.registry());
94 metrics_state_manager_ = MetricsStateManager::Create( 94 metrics_state_manager_ = MetricsStateManager::Create(
95 GetLocalState(), 95 GetLocalState(),
96 base::Bind(&MetricsServiceTest::is_metrics_reporting_enabled, 96 base::Bind(&MetricsServiceTest::is_metrics_reporting_enabled,
97 base::Unretained(this)), 97 base::Unretained(this)),
98 base::Bind(&StoreNoClientInfoBackup), 98 base::Bind(&StoreNoClientInfoBackup),
99 base::Bind(&ReturnNoBackup)); 99 base::Bind(&ReturnNoBackup));
100 } 100 }
101 101
102 virtual ~MetricsServiceTest() { 102 ~MetricsServiceTest() override {
103 MetricsService::SetExecutionPhase(MetricsService::UNINITIALIZED_PHASE, 103 MetricsService::SetExecutionPhase(MetricsService::UNINITIALIZED_PHASE,
104 GetLocalState()); 104 GetLocalState());
105 } 105 }
106 106
107 MetricsStateManager* GetMetricsStateManager() { 107 MetricsStateManager* GetMetricsStateManager() {
108 return metrics_state_manager_.get(); 108 return metrics_state_manager_.get();
109 } 109 }
110 110
111 PrefService* GetLocalState() { return &testing_local_state_; } 111 PrefService* GetLocalState() { return &testing_local_state_; }
112 112
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 "clientID", 1, MetricsLog::ONGOING_LOG, &client, GetLocalState()))); 351 "clientID", 1, MetricsLog::ONGOING_LOG, &client, GetLocalState())));
352 service.GetCurrentSyntheticFieldTrials(&synthetic_trials); 352 service.GetCurrentSyntheticFieldTrials(&synthetic_trials);
353 EXPECT_EQ(3U, synthetic_trials.size()); 353 EXPECT_EQ(3U, synthetic_trials.size());
354 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial1", "Group2")); 354 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial1", "Group2"));
355 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial2", "Group2")); 355 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial2", "Group2"));
356 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial3", "Group3")); 356 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial3", "Group3"));
357 service.log_manager_.FinishCurrentLog(); 357 service.log_manager_.FinishCurrentLog();
358 } 358 }
359 359
360 } // namespace metrics 360 } // namespace metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698