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

Side by Side Diff: ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider_unittest.mm

Issue 1995983002: Fix "unused variable" warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider.h" 5 #include "ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 bool HasCrashLogs() override { return has_crash_logs_; } 48 bool HasCrashLogs() override { return has_crash_logs_; }
49 bool HasUploadedCrashReportsInBackground() override { 49 bool HasUploadedCrashReportsInBackground() override {
50 return has_uploaded_crash_reports_in_background_; 50 return has_uploaded_crash_reports_in_background_;
51 } 51 }
52 bool ReceivedMemoryWarningBeforeLastShutdown() override { 52 bool ReceivedMemoryWarningBeforeLastShutdown() override {
53 return received_memory_warning_before_last_shutdown_; 53 return received_memory_warning_before_last_shutdown_;
54 } 54 }
55 55
56 private: 56 private:
57 bool is_first_launch_after_upgrade_; 57 bool is_first_launch_after_upgrade_;
58 bool was_last_shutdown_clean_;
59 bool has_crash_logs_; 58 bool has_crash_logs_;
60 bool has_uploaded_crash_reports_in_background_; 59 bool has_uploaded_crash_reports_in_background_;
61 bool received_memory_warning_before_last_shutdown_; 60 bool received_memory_warning_before_last_shutdown_;
62 61
63 DISALLOW_COPY_AND_ASSIGN(MobileSessionShutdownMetricsProviderForTesting); 62 DISALLOW_COPY_AND_ASSIGN(MobileSessionShutdownMetricsProviderForTesting);
64 }; 63 };
65 64
66 class MobileSessionShutdownMetricsProviderTest 65 class MobileSessionShutdownMetricsProviderTest
67 : public testing::TestWithParam<int> { 66 : public testing::TestWithParam<int> {
68 public: 67 public:
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Now call the method under test and verify exactly one sample is written to 172 // Now call the method under test and verify exactly one sample is written to
174 // the expected bucket. 173 // the expected bucket.
175 metrics_provider_->ProvideInitialStabilityMetrics(nullptr); 174 metrics_provider_->ProvideInitialStabilityMetrics(nullptr);
176 histogram_tester.ExpectUniqueSample("Stability.MobileSessionShutdownType", 175 histogram_tester.ExpectUniqueSample("Stability.MobileSessionShutdownType",
177 expected_buckets[GetParam()], 1); 176 expected_buckets[GetParam()], 1);
178 } 177 }
179 178
180 INSTANTIATE_TEST_CASE_P(/* No InstantiationName */, 179 INSTANTIATE_TEST_CASE_P(/* No InstantiationName */,
181 MobileSessionShutdownMetricsProviderTest, 180 MobileSessionShutdownMetricsProviderTest,
182 testing::Range(0, 32)); 181 testing::Range(0, 32));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698