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

Side by Side Diff: webkit/glue/plugins/plugin_lib_mac.mm

Issue 3750001: base: Move SplitString functions into the base namespace and update the callers. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: brett review, reverted changes in o3d due to it's using an old base revision Created 10 years, 2 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 | « views/controls/label.cc ('k') | webkit/glue/plugins/plugin_lib_posix.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #include "webkit/glue/plugins/plugin_lib.h" 7 #include "webkit/glue/plugins/plugin_lib.h"
8 8
9 #include "base/native_library.h" 9 #include "base/native_library.h"
10 #include "base/scoped_cftyperef.h" 10 #include "base/scoped_cftyperef.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 kSTRPluginDescriptionResourceID, 193 kSTRPluginDescriptionResourceID,
194 &plugin_descs); 194 &plugin_descs);
195 195
196 size_t num_types = type_strings.size()/2; 196 size_t num_types = type_strings.size()/2;
197 197
198 for (size_t i = 0; i < num_types; ++i) { 198 for (size_t i = 0; i < num_types; ++i) {
199 WebPluginMimeType mime; 199 WebPluginMimeType mime;
200 mime.mime_type = StringToLowerASCII(type_strings[2*i]); 200 mime.mime_type = StringToLowerASCII(type_strings[2*i]);
201 if (have_type_descs && i < type_descs.size()) 201 if (have_type_descs && i < type_descs.size())
202 mime.description = UTF8ToUTF16(type_descs[i]); 202 mime.description = UTF8ToUTF16(type_descs[i]);
203 SplitString(StringToLowerASCII(type_strings[2*i+1]), ',', 203 base::SplitString(
204 &mime.file_extensions); 204 StringToLowerASCII(type_strings[2*i+1]), ',', &mime.file_extensions);
205 205
206 info->mime_types.push_back(mime); 206 info->mime_types.push_back(mime);
207 } 207 }
208 208
209 NSString* plugin_vers = 209 NSString* plugin_vers =
210 (NSString*)CFBundleGetValueForInfoDictionaryKey(bundle, 210 (NSString*)CFBundleGetValueForInfoDictionaryKey(bundle,
211 CFSTR("CFBundleShortVersionString")); 211 CFSTR("CFBundleShortVersionString"));
212 212
213 if (have_plugin_descs && plugin_descs.size() > 1) 213 if (have_plugin_descs && plugin_descs.size() > 1)
214 info->name = UTF8ToUTF16(plugin_descs[1]); 214 info->name = UTF8ToUTF16(plugin_descs[1]);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 if (ReadSTRPluginInfo(filename, bundle.get(), info)) 339 if (ReadSTRPluginInfo(filename, bundle.get(), info))
340 return true; 340 return true;
341 341
342 // ... or not 342 // ... or not
343 343
344 return false; 344 return false;
345 } 345 }
346 346
347 } // namespace NPAPI 347 } // namespace NPAPI
OLDNEW
« no previous file with comments | « views/controls/label.cc ('k') | webkit/glue/plugins/plugin_lib_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698