| 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/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" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 | 140 |
| 141 // Rename didn't work so try to rename by calling Google Update | 141 // Rename didn't work so try to rename by calling Google Update |
| 142 return InvokeGoogleUpdateForRename(); | 142 return InvokeGoogleUpdateForRename(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool DoUpgradeTasks(const CommandLine& command_line) { | 145 bool DoUpgradeTasks(const CommandLine& command_line) { |
| 146 // The DelegateExecute verb handler finalizes pending in-use updates for | 146 // The DelegateExecute verb handler finalizes pending in-use updates for |
| 147 // metro mode launches, as Chrome cannot be gracefully relaunched when | 147 // metro mode launches, as Chrome cannot be gracefully relaunched when |
| 148 // running in this mode. | 148 // running in this mode. |
| 149 if (base::win::GetMetroModule()) | 149 if (base::win::IsMetroProcess()) |
| 150 return false; | 150 return false; |
| 151 if (!SwapNewChromeExeIfPresent()) | 151 if (!SwapNewChromeExeIfPresent()) |
| 152 return false; | 152 return false; |
| 153 // At this point the chrome.exe has been swapped with the new one. | 153 // At this point the chrome.exe has been swapped with the new one. |
| 154 if (!RelaunchChromeBrowser(command_line)) { | 154 if (!RelaunchChromeBrowser(command_line)) { |
| 155 // The re-launch fails. Feel free to panic now. | 155 // The re-launch fails. Feel free to panic now. |
| 156 NOTREACHED(); | 156 NOTREACHED(); |
| 157 } | 157 } |
| 158 return true; | 158 return true; |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace upgrade_util | 161 } // namespace upgrade_util |
| OLD | NEW |