| 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 "win8/delegate_execute/chrome_util.h" | 5 #include "win8/delegate_execute/chrome_util.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 "hr=0x%X.\n", __FUNCTION__, hr); | 140 "hr=0x%X.\n", __FUNCTION__, hr); |
| 141 } else { | 141 } else { |
| 142 process = base::Process(reinterpret_cast<base::ProcessHandle>(handle)); | 142 process = base::Process(reinterpret_cast<base::ProcessHandle>(handle)); |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 } | 145 } |
| 146 | 146 |
| 147 // Wait for the update to complete and report the results. | 147 // Wait for the update to complete and report the results. |
| 148 if (process.IsValid()) { | 148 if (process.IsValid()) { |
| 149 int exit_code = 0; | 149 int exit_code = 0; |
| 150 if (!base::WaitForExitCodeWithTimeout( | 150 if (!process.WaitForExitWithTimeout( |
| 151 process.Handle(), &exit_code, | 151 base::TimeDelta::FromMilliseconds(INFINITE), &exit_code)) { |
| 152 base::TimeDelta::FromMilliseconds(INFINITE))) { | |
| 153 AtlTrace("%hs. Failed to get result when finalizing update.\n", | 152 AtlTrace("%hs. Failed to get result when finalizing update.\n", |
| 154 __FUNCTION__); | 153 __FUNCTION__); |
| 155 } else if (exit_code != installer::RENAME_SUCCESSFUL) { | 154 } else if (exit_code != installer::RENAME_SUCCESSFUL) { |
| 156 AtlTrace("%hs. Failed to finalize update with exit code %d.\n", | 155 AtlTrace("%hs. Failed to finalize update with exit code %d.\n", |
| 157 __FUNCTION__, exit_code); | 156 __FUNCTION__, exit_code); |
| 158 } else { | 157 } else { |
| 159 AtlTrace("%hs. Finalized pending update.\n", __FUNCTION__); | 158 AtlTrace("%hs. Finalized pending update.\n", __FUNCTION__); |
| 160 } | 159 } |
| 161 } | 160 } |
| 162 #endif | 161 #endif |
| 163 } | 162 } |
| 164 | 163 |
| 165 } // delegate_execute | 164 } // delegate_execute |
| OLD | NEW |