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

Side by Side Diff: chrome/renderer/media/chrome_key_systems.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « chrome/installer/util/user_experiment.cc ('k') | chrome/renderer/page_load_histograms.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/media/chrome_key_systems.h" 5 #include "chrome/renderer/media/chrome_key_systems.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (additional_param_names[i] == 130 if (additional_param_names[i] ==
131 base::ASCIIToUTF16(kCdmSupportedCodecsParamName)) { 131 base::ASCIIToUTF16(kCdmSupportedCodecsParamName)) {
132 const base::string16& codecs_string16 = additional_param_values[i]; 132 const base::string16& codecs_string16 = additional_param_values[i];
133 std::string codecs_string; 133 std::string codecs_string;
134 if (!base::UTF16ToUTF8(codecs_string16.c_str(), 134 if (!base::UTF16ToUTF8(codecs_string16.c_str(),
135 codecs_string16.length(), 135 codecs_string16.length(),
136 &codecs_string)) { 136 &codecs_string)) {
137 DLOG(WARNING) << "Non-UTF-8 codecs string."; 137 DLOG(WARNING) << "Non-UTF-8 codecs string.";
138 // Continue using the best effort conversion. 138 // Continue using the best effort conversion.
139 } 139 }
140 base::SplitString(codecs_string, 140 *codecs = base::SplitString(
141 kCdmSupportedCodecsValueDelimiter, 141 codecs_string, std::string(1, kCdmSupportedCodecsValueDelimiter),
142 codecs); 142 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
143 break; 143 break;
144 } 144 }
145 } 145 }
146 } 146 }
147 147
148 static void AddPepperBasedWidevine( 148 static void AddPepperBasedWidevine(
149 std::vector<KeySystemInfo>* concrete_key_systems) { 149 std::vector<KeySystemInfo>* concrete_key_systems) {
150 #if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) 150 #if defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
151 Version glibc_version(gnu_get_libc_version()); 151 Version glibc_version(gnu_get_libc_version());
152 DCHECK(glibc_version.IsValid()); 152 DCHECK(glibc_version.IsValid());
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 #if defined(WIDEVINE_CDM_AVAILABLE) 222 #if defined(WIDEVINE_CDM_AVAILABLE)
223 AddPepperBasedWidevine(key_systems_info); 223 AddPepperBasedWidevine(key_systems_info);
224 #endif // defined(WIDEVINE_CDM_AVAILABLE) 224 #endif // defined(WIDEVINE_CDM_AVAILABLE)
225 #endif // defined(ENABLE_PEPPER_CDMS) 225 #endif // defined(ENABLE_PEPPER_CDMS)
226 226
227 #if defined(OS_ANDROID) 227 #if defined(OS_ANDROID)
228 cdm::AddAndroidWidevine(key_systems_info); 228 cdm::AddAndroidWidevine(key_systems_info);
229 #endif // defined(OS_ANDROID) 229 #endif // defined(OS_ANDROID)
230 } 230 }
OLDNEW
« no previous file with comments | « chrome/installer/util/user_experiment.cc ('k') | chrome/renderer/page_load_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698