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

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

Issue 2815923004: Remove references to WinFlapper. (Closed)
Patch Set: Created 3 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 | « 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 return true; 96 return true;
97 } 97 }
98 98
99 } // namespace 99 } // namespace
100 100
101 bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, 101 bool CheckPepperFlashManifest(const base::DictionaryValue& manifest,
102 base::Version* version_out) { 102 base::Version* version_out) {
103 std::string name; 103 std::string name;
104 manifest.GetStringASCII("name", &name); 104 manifest.GetStringASCII("name", &name);
105 // TODO(viettrungluu): Support WinFlapper for now, while we change the format 105 if (name != kPepperFlashManifestName)
106 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say,
107 // Nov. 2011.) crbug.com/98458
108 if (name != kPepperFlashManifestName && name != "WinFlapper")
109 return false; 106 return false;
110 107
111 std::string proposed_version; 108 std::string proposed_version;
112 manifest.GetStringASCII("version", &proposed_version); 109 manifest.GetStringASCII("version", &proposed_version);
113 base::Version version(proposed_version); 110 base::Version version(proposed_version);
114 if (!version.IsValid()) 111 if (!version.IsValid())
115 return false; 112 return false;
116 113
117 if (!CheckPepperFlashInterfaces(manifest)) 114 if (!CheckPepperFlashInterfaces(manifest))
118 return false; 115 return false;
119 116
120 // TODO(viettrungluu): See above TODO.
121 if (name == "WinFlapper") {
122 *version_out = version;
123 return true;
124 }
125
126 std::string os; 117 std::string os;
127 manifest.GetStringASCII("x-ppapi-os", &os); 118 manifest.GetStringASCII("x-ppapi-os", &os);
128 if (os != kPepperFlashOperatingSystem) 119 if (os != kPepperFlashOperatingSystem)
129 return false; 120 return false;
130 121
131 std::string arch; 122 std::string arch;
132 manifest.GetStringASCII("x-ppapi-arch", &arch); 123 manifest.GetStringASCII("x-ppapi-arch", &arch);
133 if (arch != kPepperFlashArch) { 124 if (arch != kPepperFlashArch) {
134 #if defined(OS_MACOSX) 125 #if defined(OS_MACOSX)
135 // On Mac OS X the arch is 'x64' for component updated Flash but 'mac' for 126 // On Mac OS X the arch is 'x64' for component updated Flash but 'mac' for
(...skipping 21 matching lines...) Expand all
157 return false; 148 return false;
158 149
159 return (debug_value == 1); 150 return (debug_value == 1);
160 #else 151 #else
161 // TODO(wfh): implement this on OS X and Linux. crbug.com/497996. 152 // TODO(wfh): implement this on OS X and Linux. crbug.com/497996.
162 return false; 153 return false;
163 #endif 154 #endif
164 } 155 }
165 156
166 } // namespace chrome 157 } // 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