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

Side by Side Diff: net/base/mime_util.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (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 | « net/base/keygen_handler_win.cc ('k') | net/base/mime_util_unittest.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) 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 <algorithm> 5 #include <algorithm>
6 #include <iterator> 6 #include <iterator>
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 const std::string& leading_mime_type, 869 const std::string& leading_mime_type,
870 base::hash_set<base::FilePath::StringType>* extensions) { 870 base::hash_set<base::FilePath::StringType>* extensions) {
871 base::FilePath::StringType extension; 871 base::FilePath::StringType extension;
872 for (size_t i = 0; i < mappings_len; ++i) { 872 for (size_t i = 0; i < mappings_len; ++i) {
873 if (StartsWithASCII(mappings[i].mime_type, leading_mime_type, false)) { 873 if (StartsWithASCII(mappings[i].mime_type, leading_mime_type, false)) {
874 std::vector<string> this_extensions; 874 std::vector<string> this_extensions;
875 base::SplitStringUsingSubstr(mappings[i].extensions, ",", 875 base::SplitStringUsingSubstr(mappings[i].extensions, ",",
876 &this_extensions); 876 &this_extensions);
877 for (size_t j = 0; j < this_extensions.size(); ++j) { 877 for (size_t j = 0; j < this_extensions.size(); ++j) {
878 #if defined(OS_WIN) 878 #if defined(OS_WIN)
879 base::FilePath::StringType extension(UTF8ToWide(this_extensions[j])); 879 base::FilePath::StringType extension(
880 base::UTF8ToWide(this_extensions[j]));
880 #else 881 #else
881 base::FilePath::StringType extension(this_extensions[j]); 882 base::FilePath::StringType extension(this_extensions[j]);
882 #endif 883 #endif
883 extensions->insert(extension); 884 extensions->insert(extension);
884 } 885 }
885 } 886 }
886 } 887 }
887 } 888 }
888 889
889 void GetExtensionsHelper( 890 void GetExtensionsHelper(
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 post_data->append("\r\n" + value + "\r\n"); 1018 post_data->append("\r\n" + value + "\r\n");
1018 } 1019 }
1019 1020
1020 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, 1021 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary,
1021 std::string* post_data) { 1022 std::string* post_data) {
1022 DCHECK(post_data); 1023 DCHECK(post_data);
1023 post_data->append("--" + mime_boundary + "--\r\n"); 1024 post_data->append("--" + mime_boundary + "--\r\n");
1024 } 1025 }
1025 1026
1026 } // namespace net 1027 } // namespace net
OLDNEW
« no previous file with comments | « net/base/keygen_handler_win.cc ('k') | net/base/mime_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698