Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4766)

Unified Diff: chrome/common/chrome_paths.cc

Issue 2963783002: Remove unsafe registry APIs from base::win::RegKey
Patch Set: half-fix remoting Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/chrome_paths.cc
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 0506aa8e19282581106868cd8def63c9300cb8d5..4e95832a87f85c01777a5c7f37b8b3b451704e4f 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -121,6 +121,8 @@ bool GetSystemFlashFilename(base::FilePath* out_path) {
base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kPepperFlashRegistryRoot,
KEY_READ);
+ if (!path_key.Valid())
+ return false;
base::string16 path_str;
if (FAILED(path_key.ReadValue(kFlashPlayerPathValueName, &path_str)))
grt (UTC plus 2) 2017/06/29 08:49:47 ugh, FAILED is wrong
return false;

Powered by Google App Engine
This is Rietveld 408576698