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

Side by Side Diff: components/metrics/metrics_reporting_scheduler_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_reporting_scheduler.h" 5 #include "components/metrics/metrics_reporting_scheduler.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.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 class MetricsReportingSchedulerTest : public testing::Test { 15 class MetricsReportingSchedulerTest : public testing::Test {
16 public: 16 public:
17 MetricsReportingSchedulerTest() : callback_call_count_(0) {} 17 MetricsReportingSchedulerTest() : callback_call_count_(0) {}
18 virtual ~MetricsReportingSchedulerTest() {} 18 ~MetricsReportingSchedulerTest() override {}
19 19
20 base::Closure GetCallback() { 20 base::Closure GetCallback() {
21 return base::Bind(&MetricsReportingSchedulerTest::SchedulerCallback, 21 return base::Bind(&MetricsReportingSchedulerTest::SchedulerCallback,
22 base::Unretained(this)); 22 base::Unretained(this));
23 } 23 }
24 24
25 int callback_call_count() const { return callback_call_count_; } 25 int callback_call_count() const { return callback_call_count_; }
26 26
27 private: 27 private:
28 void SchedulerCallback() { 28 void SchedulerCallback() {
(...skipping 24 matching lines...) Expand all
53 scheduler.SetUploadIntervalForTesting(base::TimeDelta()); 53 scheduler.SetUploadIntervalForTesting(base::TimeDelta());
54 scheduler.Start(); 54 scheduler.Start();
55 base::RunLoop().RunUntilIdle(); 55 base::RunLoop().RunUntilIdle();
56 EXPECT_EQ(0, callback_call_count()); 56 EXPECT_EQ(0, callback_call_count());
57 57
58 scheduler.InitTaskComplete(); 58 scheduler.InitTaskComplete();
59 EXPECT_EQ(1, callback_call_count()); 59 EXPECT_EQ(1, callback_call_count());
60 } 60 }
61 61
62 } // namespace metrics 62 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/metrics_log_unittest.cc ('k') | components/metrics/metrics_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698