OLD | NEW |
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // TODO(viettrungluu): Support WinFlapper for now, while we change the format |
106 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say, | 106 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say, |
107 // Nov. 2011.) crbug.com/98458 | 107 // Nov. 2011.) crbug.com/98458 |
108 if (name != kPepperFlashManifestName && name != "WinFlapper") | 108 if (name != kPepperFlashManifestName && name != "WinFlapper") |
109 return false; | 109 return false; |
110 | 110 |
111 std::string proposed_version; | 111 std::string proposed_version; |
112 manifest.GetStringASCII("version", &proposed_version); | 112 manifest.GetStringASCII("version", &proposed_version); |
113 base::Version version(proposed_version.c_str()); | 113 base::Version version(proposed_version); |
114 if (!version.IsValid()) | 114 if (!version.IsValid()) |
115 return false; | 115 return false; |
116 | 116 |
117 if (!CheckPepperFlashInterfaces(manifest)) | 117 if (!CheckPepperFlashInterfaces(manifest)) |
118 return false; | 118 return false; |
119 | 119 |
120 // TODO(viettrungluu): See above TODO. | 120 // TODO(viettrungluu): See above TODO. |
121 if (name == "WinFlapper") { | 121 if (name == "WinFlapper") { |
122 *version_out = version; | 122 *version_out = version; |
123 return true; | 123 return true; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 return false; | 157 return false; |
158 | 158 |
159 return (debug_value == 1); | 159 return (debug_value == 1); |
160 #else | 160 #else |
161 // TODO(wfh): implement this on OS X and Linux. crbug.com/497996. | 161 // TODO(wfh): implement this on OS X and Linux. crbug.com/497996. |
162 return false; | 162 return false; |
163 #endif | 163 #endif |
164 } | 164 } |
165 | 165 |
166 } // namespace chrome | 166 } // namespace chrome |
OLD | NEW |