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

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

Issue 14946003: Record first run startup metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Startup.FirstRun.BrowserMessageLoopStartTimeFromMainEntry --> Startup.BrowserMessageLoopStartTimeFr… Created 7 years, 7 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 4177eaefd909ccf34c91a6f2799f660fee2bdc13..e66a27e10c87e95452ca9a5b5b6dd25f853c8296 100644
--- a/chrome/browser/first_run/first_run_posix.cc
+++ b/chrome/browser/first_run/first_run_posix.cc
@@ -4,11 +4,14 @@
#include "chrome/browser/first_run/first_run.h"
+#include "base/file_util.h"
+#include "base/files/file_path.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/prefs/pref_service.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/first_run/first_run_dialog.h"
#include "chrome/browser/first_run/first_run_internal.h"
#include "chrome/browser/importer/importer_host.h"
#include "chrome/browser/importer/importer_list.h"
@@ -16,6 +19,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/startup_metric_utils.h"
#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/master_preferences.h"
#include "chrome/installer/util/master_preferences_constants.h"
@@ -23,8 +27,22 @@
namespace first_run {
namespace internal {
-void DoPostImportPlatformSpecificTasks() {
+void DoPostImportPlatformSpecificTasks(Profile* profile) {
#if !defined(OS_CHROMEOS)
+ // Aura needs a views implementation of the first run dialog for Linux.
+ // http://crbug.com/234637
+#if !defined(USE_AURA)
+ base::FilePath local_state_path;
+ PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path);
+ bool local_state_file_exists = file_util::PathExists(local_state_path);
+ // Launch the first run dialog only for certain builds, and only if the user
+ // has not already set preferences.
+ if (internal::IsOrganicFirstRun() && !local_state_file_exists) {
+ if (ShowFirstRunDialog(profile))
+ startup_metric_utils::SetNonBrowserUIDisplayed();
+ }
+#endif
+
// 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).
« 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