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

Side by Side Diff: content/common/plugin_list.cc

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
« no previous file with comments | « content/common/pepper_plugin_list.cc ('k') | content/common/plugin_list_mac.mm » ('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) 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 "content/common/plugin_list.h" 5 #include "content/common/plugin_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 mime_type.mime_type = StringToLowerASCII(mime_types[i]); 146 mime_type.mime_type = StringToLowerASCII(mime_types[i]);
147 if (file_extensions.size() > i) 147 if (file_extensions.size() > i)
148 base::SplitString(file_extensions[i], ',', &mime_type.file_extensions); 148 base::SplitString(file_extensions[i], ',', &mime_type.file_extensions);
149 149
150 if (descriptions.size() > i) { 150 if (descriptions.size() > i) {
151 mime_type.description = descriptions[i]; 151 mime_type.description = descriptions[i];
152 152
153 // On Windows, the description likely has a list of file extensions 153 // On Windows, the description likely has a list of file extensions
154 // embedded in it (e.g. "SurfWriter file (*.swr)"). Remove an extension 154 // embedded in it (e.g. "SurfWriter file (*.swr)"). Remove an extension
155 // list from the description if it is present. 155 // list from the description if it is present.
156 size_t ext = mime_type.description.find(ASCIIToUTF16("(*")); 156 size_t ext = mime_type.description.find(base::ASCIIToUTF16("(*"));
157 if (ext != base::string16::npos) { 157 if (ext != base::string16::npos) {
158 if (ext > 1 && mime_type.description[ext - 1] == ' ') 158 if (ext > 1 && mime_type.description[ext - 1] == ' ')
159 ext--; 159 ext--;
160 160
161 mime_type.description.erase(ext); 161 mime_type.description.erase(ext);
162 } 162 }
163 } 163 }
164 164
165 parsed_mime_types->push_back(mime_type); 165 parsed_mime_types->push_back(mime_type);
166 } 166 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 plugin_path); 406 plugin_path);
407 if (it != extra_plugin_paths_.end()) 407 if (it != extra_plugin_paths_.end())
408 extra_plugin_paths_.erase(it); 408 extra_plugin_paths_.erase(it);
409 } 409 }
410 410
411 PluginList::~PluginList() { 411 PluginList::~PluginList() {
412 } 412 }
413 413
414 414
415 } // namespace content 415 } // namespace content
OLDNEW
« no previous file with comments | « content/common/pepper_plugin_list.cc ('k') | content/common/plugin_list_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698