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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/pepper_flash.h"
6
5 #include <stddef.h> 7 #include <stddef.h>
6 8
7 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
8 #include "base/values.h" 10 #include "base/values.h"
9 #include "base/version.h" 11 #include "base/version.h"
10 #include "build/build_config.h" 12 #include "build/build_config.h"
11 #include "chrome/common/pepper_flash.h"
12 #include "chrome/common/ppapi_utils.h" 13 #include "chrome/common/ppapi_utils.h"
13 #include "ppapi/c/private/ppb_pdf.h" 14 #include "ppapi/c/private/ppb_pdf.h"
14 #include "ppapi/shared_impl/ppapi_permissions.h" 15 #include "ppapi/shared_impl/ppapi_permissions.h"
15 16
17 #if defined(OS_WIN)
18 #include "base/win/registry.h"
19 #endif
20
16 namespace chrome { 21 namespace chrome {
17 22
18 const int32_t kPepperFlashPermissions = 23 const int32_t kPepperFlashPermissions =
19 ppapi::PERMISSION_DEV | ppapi::PERMISSION_PRIVATE | 24 ppapi::PERMISSION_DEV | ppapi::PERMISSION_PRIVATE |
20 ppapi::PERMISSION_BYPASS_USER_GESTURE | ppapi::PERMISSION_FLASH; 25 ppapi::PERMISSION_BYPASS_USER_GESTURE | ppapi::PERMISSION_FLASH;
21 namespace { 26 namespace {
22 27
23 // File name of the Pepper Flash component manifest on different platforms. 28 // File name of the Pepper Flash component manifest on different platforms.
24 const char kPepperFlashManifestName[] = "Flapper"; 29 const char kPepperFlashManifestName[] = "Flapper";
25 30
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 126
122 std::string arch; 127 std::string arch;
123 manifest.GetStringASCII("x-ppapi-arch", &arch); 128 manifest.GetStringASCII("x-ppapi-arch", &arch);
124 if (arch != kPepperFlashArch) 129 if (arch != kPepperFlashArch)
125 return false; 130 return false;
126 131
127 *version_out = version; 132 *version_out = version;
128 return true; 133 return true;
129 } 134 }
130 135
136 bool IsSystemFlashScriptDebuggerPresent() {
137 #if defined(OS_WIN)
138 const wchar_t kFlashRegistryRoot[] =
139 L"SOFTWARE\\Macromedia\\FlashPlayerPepper";
140 const wchar_t kIsDebuggerValueName[] = L"isScriptDebugger";
141
142 base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kFlashRegistryRoot, KEY_READ);
143 DWORD debug_value;
144 if (path_key.ReadValueDW(kIsDebuggerValueName, &debug_value) != ERROR_SUCCESS)
145 return false;
146
147 return (debug_value == 1);
148 #else
149 // TODO(wfh): implement this on OS X and Linux. crbug.com/497996.
150 return false;
151 #endif
152 }
153
131 } // namespace chrome 154 } // namespace chrome
OLDNEW
« 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