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

Unified Diff: ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider_unittest.mm

Issue 1958003003: Splitting the concept of UMA consent, and should UMA report. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider_unittest.mm
diff --git a/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider_unittest.mm b/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider_unittest.mm
index 6efc02fd9a01f20c446db7f4415aa59565fa00c6..f893077f8b72edec4c5bbf05b28c83a1a5fb700a 100644
--- a/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider_unittest.mm
+++ b/ios/chrome/browser/metrics/mobile_session_shutdown_metrics_provider_unittest.mm
@@ -14,19 +14,12 @@
#include "components/metrics/metrics_pref_names.h"
#include "components/metrics/metrics_service.h"
#include "components/metrics/metrics_state_manager.h"
+#include "components/metrics/test_enabled_state_provider.h"
#include "components/metrics/test_metrics_service_client.h"
#include "components/prefs/testing_pref_service.h"
#include "testing/gtest/include/gtest/gtest-param-test.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace {
-
-bool IsMetricsReportingEnabled() {
- return false;
-}
-
-} // namespace
-
// An MobileSessionShutdownMetricsProvider that returns fake values for the last
// session environment query methods.
class MobileSessionShutdownMetricsProviderForTesting
@@ -154,7 +147,7 @@ TEST_P(MobileSessionShutdownMetricsProviderTest, ProvideStabilityMetrics) {
local_state_.SetBoolean(metrics::prefs::kStabilityExitedCleanly,
was_last_shutdown_clean);
metrics_state_ = metrics::MetricsStateManager::Create(
- &local_state_, base::Bind(&IsMetricsReportingEnabled),
+ &local_state_, new metrics::TestEnabledStateProvider(false, false),
metrics::MetricsStateManager::StoreClientInfoCallback(),
metrics::MetricsStateManager::LoadClientInfoCallback());
metrics_service_.reset(new metrics::MetricsService(
« no previous file with comments | « ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698