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

Unified Diff: chrome/common/pepper_flash.cc

Issue 1867833003: Prefer System Flash over non-local component updated Flash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac Created 4 years, 8 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
« no previous file with comments | « chrome/common/pepper_flash.h ('k') | content/public/common/pepper_plugin_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/pepper_flash.cc
diff --git a/chrome/common/pepper_flash.cc b/chrome/common/pepper_flash.cc
index 3b6cbd998c03ca1b5e4906cfe758352af96a0352..d7a5ac45ef5f11d9181e1a414027ba479eab89c4 100644
--- a/chrome/common/pepper_flash.cc
+++ b/chrome/common/pepper_flash.cc
@@ -2,17 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "chrome/common/pepper_flash.h"
+
#include <stddef.h>
#include "base/strings/string_split.h"
#include "base/values.h"
#include "base/version.h"
#include "build/build_config.h"
-#include "chrome/common/pepper_flash.h"
#include "chrome/common/ppapi_utils.h"
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
+#if defined(OS_WIN)
+#include "base/win/registry.h"
+#endif
+
namespace chrome {
const int32_t kPepperFlashPermissions =
@@ -128,4 +133,22 @@ bool CheckPepperFlashManifest(const base::DictionaryValue& manifest,
return true;
}
+bool IsSystemFlashScriptDebuggerPresent() {
+#if defined(OS_WIN)
+ const wchar_t kFlashRegistryRoot[] =
+ L"SOFTWARE\\Macromedia\\FlashPlayerPepper";
+ const wchar_t kIsDebuggerValueName[] = L"isScriptDebugger";
+
+ base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kFlashRegistryRoot, KEY_READ);
+ DWORD debug_value;
+ if (path_key.ReadValueDW(kIsDebuggerValueName, &debug_value) != ERROR_SUCCESS)
+ return false;
+
+ return (debug_value == 1);
+#else
+ // TODO(wfh): implement this on OS X and Linux. crbug.com/497996.
+ return false;
+#endif
+}
+
} // namespace chrome
« no previous file with comments | « chrome/common/pepper_flash.h ('k') | content/public/common/pepper_plugin_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698