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

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

Issue 11636031: [Fixit Dec-2012] Refactor first_run, very few things should depend on whether the First Run senti... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No first run import test on OS_CHROMEOS. Created 7 years, 12 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 | « chrome/browser/first_run/first_run_internal.h ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/first_run/first_run_internal.h ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698