| 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).
|
|
|