| OLD | NEW |
| 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 <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
| 16 #include "base/process/kill.h" | 16 #include "base/process/kill.h" |
| 17 #include "base/process/launch.h" | 17 #include "base/process/launch.h" |
| 18 #include "base/process/process.h" | 18 #include "base/process/process.h" |
| 19 #include "base/threading/sequenced_worker_pool.h" | 19 #include "base/threading/sequenced_worker_pool.h" |
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 21 #include "base/win/metro.h" | 21 #include "base/win/metro.h" |
| 22 #include "chrome/common/chrome_constants.h" | 22 #include "chrome/common/chrome_constants.h" |
| 23 #include "chrome/common/chrome_paths.h" | 23 #include "chrome/common/chrome_paths.h" |
| 24 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
| 25 #include "chrome/grit/locale_settings.h" |
| 25 #include "chrome/installer/util/google_update_settings.h" | 26 #include "chrome/installer/util/google_update_settings.h" |
| 26 #include "chrome/installer/util/install_util.h" | 27 #include "chrome/installer/util/install_util.h" |
| 27 #include "chrome/installer/util/master_preferences.h" | 28 #include "chrome/installer/util/master_preferences.h" |
| 28 #include "chrome/installer/util/master_preferences_constants.h" | 29 #include "chrome/installer/util/master_preferences_constants.h" |
| 29 #include "chrome/installer/util/util_constants.h" | 30 #include "chrome/installer/util/util_constants.h" |
| 30 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
| 31 #include "grit/locale_settings.h" | |
| 32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
| 33 #include "ui/base/win/shell.h" | 33 #include "ui/base/win/shell.h" |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| 36 | 36 |
| 37 // Launches the setup exe with the given parameter/value on the command-line. | 37 // Launches the setup exe with the given parameter/value on the command-line. |
| 38 // For non-metro Windows, it waits for its termination, returns its exit code | 38 // For non-metro Windows, it waits for its termination, returns its exit code |
| 39 // in |*ret_code|, and returns true if the exit code is valid. | 39 // in |*ret_code|, and returns true if the exit code is valid. |
| 40 // For metro Windows, it launches setup via ShellExecuteEx and returns in order | 40 // For metro Windows, it launches setup via ShellExecuteEx and returns in order |
| 41 // to bounce the user back to the desktop, then returns immediately. | 41 // to bounce the user back to the desktop, then returns immediately. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 base::FilePath MasterPrefsPath() { | 195 base::FilePath MasterPrefsPath() { |
| 196 // The standard location of the master prefs is next to the chrome binary. | 196 // The standard location of the master prefs is next to the chrome binary. |
| 197 base::FilePath master_prefs; | 197 base::FilePath master_prefs; |
| 198 if (!PathService::Get(base::DIR_EXE, &master_prefs)) | 198 if (!PathService::Get(base::DIR_EXE, &master_prefs)) |
| 199 return base::FilePath(); | 199 return base::FilePath(); |
| 200 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); | 200 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace internal | 203 } // namespace internal |
| 204 } // namespace first_run | 204 } // namespace first_run |
| OLD | NEW |