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

Side by Side Diff: chrome/common/pepper_flash.cc

Issue 1920763004: Support 'mac' architecture for system Flash installs on OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | 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" 5 #include "chrome/common/pepper_flash.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return true; 119 return true;
120 } 120 }
121 121
122 std::string os; 122 std::string os;
123 manifest.GetStringASCII("x-ppapi-os", &os); 123 manifest.GetStringASCII("x-ppapi-os", &os);
124 if (os != kPepperFlashOperatingSystem) 124 if (os != kPepperFlashOperatingSystem)
125 return false; 125 return false;
126 126
127 std::string arch; 127 std::string arch;
128 manifest.GetStringASCII("x-ppapi-arch", &arch); 128 manifest.GetStringASCII("x-ppapi-arch", &arch);
129 if (arch != kPepperFlashArch) 129 if (arch != kPepperFlashArch) {
130 #if defined(OS_MACOSX)
131 // On Mac OS X the arch is 'x64' for component updated Flash but 'mac' for
132 // system Flash, so accept both variations.
133 if (arch != kPepperFlashOperatingSystem)
134 return false;
135 #else
130 return false; 136 return false;
137 #endif
138 }
131 139
132 *version_out = version; 140 *version_out = version;
133 return true; 141 return true;
134 } 142 }
135 143
136 bool IsSystemFlashScriptDebuggerPresent() { 144 bool IsSystemFlashScriptDebuggerPresent() {
137 #if defined(OS_WIN) 145 #if defined(OS_WIN)
138 const wchar_t kFlashRegistryRoot[] = 146 const wchar_t kFlashRegistryRoot[] =
139 L"SOFTWARE\\Macromedia\\FlashPlayerPepper"; 147 L"SOFTWARE\\Macromedia\\FlashPlayerPepper";
140 const wchar_t kIsDebuggerValueName[] = L"isScriptDebugger"; 148 const wchar_t kIsDebuggerValueName[] = L"isScriptDebugger";
141 149
142 base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kFlashRegistryRoot, KEY_READ); 150 base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kFlashRegistryRoot, KEY_READ);
143 DWORD debug_value; 151 DWORD debug_value;
144 if (path_key.ReadValueDW(kIsDebuggerValueName, &debug_value) != ERROR_SUCCESS) 152 if (path_key.ReadValueDW(kIsDebuggerValueName, &debug_value) != ERROR_SUCCESS)
145 return false; 153 return false;
146 154
147 return (debug_value == 1); 155 return (debug_value == 1);
148 #else 156 #else
149 // TODO(wfh): implement this on OS X and Linux. crbug.com/497996. 157 // TODO(wfh): implement this on OS X and Linux. crbug.com/497996.
150 return false; 158 return false;
151 #endif 159 #endif
152 } 160 }
153 161
154 } // namespace chrome 162 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698