| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 AtlTrace("%hs. Failed to open browser event; error %u.\n", __FUNCTION__, | 74 AtlTrace("%hs. Failed to open browser event; error %u.\n", __FUNCTION__, |
| 75 last_error); | 75 last_error); |
| 76 } | 76 } |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 | 79 |
| 80 // Returns true if the file new_chrome.exe exists in the same directory as | 80 // Returns true if the file new_chrome.exe exists in the same directory as |
| 81 // |chrome_exe|. | 81 // |chrome_exe|. |
| 82 bool NewChromeExeExists(const base::FilePath& chrome_exe) { | 82 bool NewChromeExeExists(const base::FilePath& chrome_exe) { |
| 83 base::FilePath new_chrome_exe(chrome_exe.DirName().Append(kNewChromeExe)); | 83 base::FilePath new_chrome_exe(chrome_exe.DirName().Append(kNewChromeExe)); |
| 84 return file_util::PathExists(new_chrome_exe); | 84 return base::PathExists(new_chrome_exe); |
| 85 } | 85 } |
| 86 | 86 |
| 87 bool GetUpdateCommand(bool is_per_user, string16* update_command) { | 87 bool GetUpdateCommand(bool is_per_user, string16* update_command) { |
| 88 const HKEY root = is_per_user ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE; | 88 const HKEY root = is_per_user ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE; |
| 89 base::win::RegKey key(root, kRegPathChromeClient, KEY_QUERY_VALUE); | 89 base::win::RegKey key(root, kRegPathChromeClient, KEY_QUERY_VALUE); |
| 90 | 90 |
| 91 return key.ReadValue(kRenameCommandValue, update_command) == ERROR_SUCCESS; | 91 return key.ReadValue(kRenameCommandValue, update_command) == ERROR_SUCCESS; |
| 92 } | 92 } |
| 93 | 93 |
| 94 #endif // GOOGLE_CHROME_BUILD | 94 #endif // GOOGLE_CHROME_BUILD |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 string16 suffix; | 259 string16 suffix; |
| 260 if (IsPerUserInstall(chrome_exe) && | 260 if (IsPerUserInstall(chrome_exe) && |
| 261 !GetUserSpecificRegistrySuffix(&suffix)) { | 261 !GetUserSpecificRegistrySuffix(&suffix)) { |
| 262 AtlTrace("%hs. GetUserSpecificRegistrySuffix failed.\n", | 262 AtlTrace("%hs. GetUserSpecificRegistrySuffix failed.\n", |
| 263 __FUNCTION__); | 263 __FUNCTION__); |
| 264 } | 264 } |
| 265 return app_id.append(suffix); | 265 return app_id.append(suffix); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // delegate_execute | 268 } // delegate_execute |
| OLD | NEW |