Chromium Code Reviews| 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/common/chrome_paths.h" | 5 #include "chrome/common/chrome_paths.h" |
| 6 | 6 |
| 7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 | 114 |
| 115 #if defined(OS_WIN) | 115 #if defined(OS_WIN) |
| 116 // Gets the Pepper Flash path if installed on the system. | 116 // Gets the Pepper Flash path if installed on the system. |
| 117 bool GetSystemFlashFilename(base::FilePath* out_path) { | 117 bool GetSystemFlashFilename(base::FilePath* out_path) { |
| 118 const wchar_t kPepperFlashRegistryRoot[] = | 118 const wchar_t kPepperFlashRegistryRoot[] = |
| 119 L"SOFTWARE\\Macromedia\\FlashPlayerPepper"; | 119 L"SOFTWARE\\Macromedia\\FlashPlayerPepper"; |
| 120 const wchar_t kFlashPlayerPathValueName[] = L"PlayerPath"; | 120 const wchar_t kFlashPlayerPathValueName[] = L"PlayerPath"; |
| 121 | 121 |
| 122 base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kPepperFlashRegistryRoot, | 122 base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kPepperFlashRegistryRoot, |
| 123 KEY_READ); | 123 KEY_READ); |
| 124 if (!path_key.Valid()) | |
| 125 return false; | |
| 124 base::string16 path_str; | 126 base::string16 path_str; |
| 125 if (FAILED(path_key.ReadValue(kFlashPlayerPathValueName, &path_str))) | 127 if (FAILED(path_key.ReadValue(kFlashPlayerPathValueName, &path_str))) |
|
grt (UTC plus 2)
2017/06/29 08:49:47
ugh, FAILED is wrong
| |
| 126 return false; | 128 return false; |
| 127 | 129 |
| 128 *out_path = base::FilePath(path_str); | 130 *out_path = base::FilePath(path_str); |
| 129 return true; | 131 return true; |
| 130 } | 132 } |
| 131 #endif | 133 #endif |
| 132 | 134 |
| 133 } // namespace | 135 } // namespace |
| 134 | 136 |
| 135 namespace chrome { | 137 namespace chrome { |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 600 | 602 |
| 601 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { | 603 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { |
| 602 g_invalid_specified_user_data_dir.Get() = user_data_dir; | 604 g_invalid_specified_user_data_dir.Get() = user_data_dir; |
| 603 } | 605 } |
| 604 | 606 |
| 605 const base::FilePath& GetInvalidSpecifiedUserDataDir() { | 607 const base::FilePath& GetInvalidSpecifiedUserDataDir() { |
| 606 return g_invalid_specified_user_data_dir.Get(); | 608 return g_invalid_specified_user_data_dir.Get(); |
| 607 } | 609 } |
| 608 | 610 |
| 609 } // namespace chrome | 611 } // namespace chrome |
| OLD | NEW |