-
Notifications
You must be signed in to change notification settings - Fork 893
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2029 from brave/fix_3816
Disabling metrics reporting; Updating ad-block deps to fix audit_deps error; Updating crypto deps to fix audit_deps error;
- Loading branch information
Showing
4 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "components/metrics/enabled_state_provider.h" | ||
|
||
#include "base/base_switches.h" | ||
#include "base/command_line.h" | ||
|
||
namespace metrics { | ||
|
||
bool EnabledStateProvider::IsReportingEnabled() const { | ||
return false; | ||
} | ||
|
||
} // namespace metrics |
27 changes: 27 additions & 0 deletions
27
chromium_src/components/metrics/enabled_state_provider_unittest.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Copyright (c) 2019 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "chrome/browser/metrics/chrome_metrics_services_manager_client.h" | ||
|
||
#include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | ||
#include "components/metrics/enabled_state_provider.h" | ||
#include "components/metrics/metrics_pref_names.h" | ||
#include "components/prefs/pref_registry_simple.h" | ||
#include "components/prefs/testing_pref_service.h" | ||
#include "testing/gtest/include/gtest/gtest.h" | ||
|
||
TEST(ChromeMetricsServicesManagerClient, MetricsReportingDisabled) { | ||
TestingPrefServiceSimple local_state; | ||
metrics::RegisterMetricsReportingStatePrefs(local_state.registry()); | ||
local_state.registry()->RegisterBooleanPref( | ||
metrics::prefs::kMetricsReportingEnabled, true); | ||
|
||
ChromeMetricsServicesManagerClient client(&local_state); | ||
const metrics::EnabledStateProvider& provider = | ||
client.GetEnabledStateProviderForTesting(); | ||
|
||
// Reporting should never be enabled | ||
EXPECT_FALSE(provider.IsReportingEnabled()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters