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

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

Issue 2262713003: Consistently use namespaced base::Version in plugins code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (!CheckPepperFlashInterfaceString(interface_string)) 88 if (!CheckPepperFlashInterfaceString(interface_string))
89 return false; 89 return false;
90 } 90 }
91 91
92 return true; 92 return true;
93 } 93 }
94 94
95 } // namespace 95 } // namespace
96 96
97 bool CheckPepperFlashManifest(const base::DictionaryValue& manifest, 97 bool CheckPepperFlashManifest(const base::DictionaryValue& manifest,
98 Version* version_out) { 98 base::Version* version_out) {
99 std::string name; 99 std::string name;
100 manifest.GetStringASCII("name", &name); 100 manifest.GetStringASCII("name", &name);
101 // TODO(viettrungluu): Support WinFlapper for now, while we change the format 101 // TODO(viettrungluu): Support WinFlapper for now, while we change the format
102 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say, 102 // of the manifest. (Should be safe to remove checks for "WinFlapper" in, say,
103 // Nov. 2011.) crbug.com/98458 103 // Nov. 2011.) crbug.com/98458
104 if (name != kPepperFlashManifestName && name != "WinFlapper") 104 if (name != kPepperFlashManifestName && name != "WinFlapper")
105 return false; 105 return false;
106 106
107 std::string proposed_version; 107 std::string proposed_version;
108 manifest.GetStringASCII("version", &proposed_version); 108 manifest.GetStringASCII("version", &proposed_version);
109 Version version(proposed_version.c_str()); 109 base::Version version(proposed_version.c_str());
110 if (!version.IsValid()) 110 if (!version.IsValid())
111 return false; 111 return false;
112 112
113 if (!CheckPepperFlashInterfaces(manifest)) 113 if (!CheckPepperFlashInterfaces(manifest))
114 return false; 114 return false;
115 115
116 // TODO(viettrungluu): See above TODO. 116 // TODO(viettrungluu): See above TODO.
117 if (name == "WinFlapper") { 117 if (name == "WinFlapper") {
118 *version_out = version; 118 *version_out = version;
119 return true; 119 return true;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return false; 153 return false;
154 154
155 return (debug_value == 1); 155 return (debug_value == 1);
156 #else 156 #else
157 // 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.
158 return false; 158 return false;
159 #endif 159 #endif
160 } 160 }
161 161
162 } // namespace chrome 162 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_metadata_unittest.cc ('k') | content/browser/plugin_data_remover_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698