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

Side by Side Diff: chrome/browser/first_run/first_run_internal_posix.cc

Issue 312583002: Move MetricsStateManager into the Metrics component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/first_run/first_run_internal.h" 5 #include "chrome/browser/first_run/first_run_internal.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 20 matching lines...) Expand all
31 if (internal::IsOrganicFirstRun() && !local_state_file_exists) { 31 if (internal::IsOrganicFirstRun() && !local_state_file_exists) {
32 if (ShowFirstRunDialog(profile)) 32 if (ShowFirstRunDialog(profile))
33 startup_metric_utils::SetNonBrowserUIDisplayed(); 33 startup_metric_utils::SetNonBrowserUIDisplayed();
34 } 34 }
35 35
36 // If stats reporting was turned on by the first run dialog then toggle 36 // If stats reporting was turned on by the first run dialog then toggle
37 // the pref (on Windows, the download is tagged with enable/disable stats so 37 // the pref (on Windows, the download is tagged with enable/disable stats so
38 // this is POSIX-specific). 38 // this is POSIX-specific).
39 if (GoogleUpdateSettings::GetCollectStatsConsent()) { 39 if (GoogleUpdateSettings::GetCollectStatsConsent()) {
40 g_browser_process->local_state()->SetBoolean( 40 g_browser_process->local_state()->SetBoolean(
41 prefs::kMetricsReportingEnabled, true); 41 metrics::prefs::kMetricsReportingEnabled, true);
42 } 42 }
43 #endif 43 #endif
44 } 44 }
45 45
46 bool IsFirstRunSentinelPresent() { 46 bool IsFirstRunSentinelPresent() {
47 base::FilePath sentinel; 47 base::FilePath sentinel;
48 return !GetFirstRunSentinelFilePath(&sentinel) || base::PathExists(sentinel); 48 return !GetFirstRunSentinelFilePath(&sentinel) || base::PathExists(sentinel);
49 } 49 }
50 50
51 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs) { 51 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs) {
52 // The EULA is only handled on Windows. 52 // The EULA is only handled on Windows.
53 return true; 53 return true;
54 } 54 }
55 55
56 } // namespace internal 56 } // namespace internal
57 } // namespace first_run 57 } // namespace first_run
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698