OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/upgrade_util.h" | 5 #include "chrome/browser/first_run/upgrade_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/environment.h" | 12 #include "base/environment.h" |
13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/process_util.h" | 17 #include "base/process_util.h" |
18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
19 #include "base/win/registry.h" | 19 #include "base/win/registry.h" |
20 #include "base/win/scoped_comptr.h" | 20 #include "base/win/scoped_comptr.h" |
21 #include "chrome/browser/first_run/upgrade_util_win.h" | 21 #include "chrome/browser/first_run/upgrade_util_win.h" |
22 #include "chrome/common/chrome_constants.h" | 22 #include "chrome/common/chrome_constants.h" |
23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/installer/util/browser_distribution.h" | 24 #include "chrome/installer/util/browser_distribution.h" |
25 #include "chrome/installer/util/google_update_constants.h" | 25 #include "chrome/installer/util/google_update_constants.h" |
26 #include "chrome/installer/util/install_util.h" | 26 #include "chrome/installer/util/install_util.h" |
27 #include "chrome/installer/util/shell_util.h" | 27 #include "chrome/installer/util/shell_util.h" |
28 #include "chrome/installer/util/util_constants.h" | 28 #include "chrome/installer/util/util_constants.h" |
29 #include "google_update_idl.h" | 29 #include "google_update/google_update_idl.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 bool GetNewerChromeFile(FilePath* path) { | 33 bool GetNewerChromeFile(FilePath* path) { |
34 if (!PathService::Get(base::DIR_EXE, path)) | 34 if (!PathService::Get(base::DIR_EXE, path)) |
35 return false; | 35 return false; |
36 *path = path->Append(installer::kChromeNewExe); | 36 *path = path->Append(installer::kChromeNewExe); |
37 return true; | 37 return true; |
38 } | 38 } |
39 | 39 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 return false; | 146 return false; |
147 // At this point the chrome.exe has been swapped with the new one. | 147 // At this point the chrome.exe has been swapped with the new one. |
148 if (!RelaunchChromeBrowser(command_line)) { | 148 if (!RelaunchChromeBrowser(command_line)) { |
149 // The re-launch fails. Feel free to panic now. | 149 // The re-launch fails. Feel free to panic now. |
150 NOTREACHED(); | 150 NOTREACHED(); |
151 } | 151 } |
152 return true; | 152 return true; |
153 } | 153 } |
154 | 154 |
155 } // namespace upgrade_util | 155 } // namespace upgrade_util |
OLD | NEW |