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

Unified Diff: chrome/browser/first_run/first_run.cc

Issue 2285483002: Move UMA to opt-out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run.cc
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index f56eb8c1f3afa9cf986d38fc6511c323a8448c24..d7d504077580d3b15f1e41713d243283dacc23ee 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -45,7 +45,6 @@
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
-#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -60,7 +59,6 @@
#include "components/search_engines/template_url_service.h"
#include "components/signin/core/browser/signin_manager.h"
#include "components/signin/core/browser/signin_tracker.h"
-#include "components/version_info/version_info.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -82,6 +80,8 @@ using base::UserMetricsAction;
namespace {
+const bool kDefaultMetricsReportingState = true;
+
// A bitfield formed from values in AutoImportState to record the state of
// AutoImport. This is used in testing to verify import startup actions that
// occur before an observer can be registered in the test.
@@ -654,25 +654,9 @@ bool IsFirstRunSuppressed(const base::CommandLine& command_line) {
#endif
bool IsMetricsReportingOptIn() {
-#if defined(OS_CHROMEOS)
- return false;
-#elif defined(OS_ANDROID)
-#error This file shouldn not be compiled on Android.
-#elif defined(OS_MACOSX)
- return chrome::GetChannel() != version_info::Channel::CANARY;
-#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
- // Treat BSD and SOLARIS like Linux to not break those builds, although these
- // platforms are not officially supported by Chrome.
- return true;
-#elif defined(OS_WIN)
- // TODO(jwd): Get this data directly from the download page.
- // Metrics reporting for Windows is initially enabled on the download page. If
- // it's opt-in or out can change without changes to Chrome. We should get this
- // information directly from the download page for it to be accurate.
- return chrome::GetChannel() == version_info::Channel::STABLE;
-#else
-#error Unsupported platform.
-#endif
+ // If default is true then it corresponds to opt-out and false corresponds to
+ // opt-in.
+ return !kDefaultMetricsReportingState;
sky 2016/08/26 00:00:57 The negative is always confusing. Is the reason yo
gayane -on leave until 09-2017 2016/08/26 00:22:34 Done.
}
void CreateSentinelIfNeeded() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698