Index: chrome/browser/first_run/first_run_posix.cc |
diff --git a/chrome/browser/first_run/first_run_posix.cc b/chrome/browser/first_run/first_run_posix.cc |
index ee40cb01757bc7dec8decaa9f406ca1748c3d1b4..09cbc9c2be3589fc19057d73e7119c3deabe0ec4 100644 |
--- a/chrome/browser/first_run/first_run_posix.cc |
+++ b/chrome/browser/first_run/first_run_posix.cc |
@@ -6,14 +6,18 @@ |
#include "base/path_service.h" |
#include "base/utf_string_conversions.h" |
+#include "chrome/browser/browser_process.h" |
#include "chrome/browser/first_run/first_run_internal.h" |
#include "chrome/browser/importer/importer_host.h" |
#include "chrome/browser/importer/importer_list.h" |
#include "chrome/browser/importer/importer_progress_dialog.h" |
#include "chrome/browser/importer/importer_progress_observer.h" |
+#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile_manager.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/chrome_paths.h" |
+#include "chrome/common/pref_names.h" |
+#include "chrome/installer/util/google_update_settings.h" |
#include "chrome/installer/util/master_preferences.h" |
#include "chrome/installer/util/master_preferences_constants.h" |
@@ -61,6 +65,18 @@ class ImportEndedObserver : public importer::ImporterProgressObserver { |
namespace first_run { |
namespace internal { |
+void DoPostImportPlatformSpecificTasks() { |
+#if !defined(OS_CHROMEOS) |
+ // If stats reporting was turned on by the first run dialog then toggle |
+ // the pref (on Windows, the download is tagged with enable/disable stats so |
+ // this is POSIX-specific). |
+ if (GoogleUpdateSettings::GetCollectStatsConsent()) { |
+ g_browser_process->local_state()->SetBoolean( |
+ prefs::kMetricsReportingEnabled, true); |
+ } |
+#endif |
+} |
+ |
bool GetFirstRunSentinelFilePath(FilePath* path) { |
FilePath first_run_sentinel; |