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

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

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows 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/browser/ui/webui/gcm_internals_ui.cc ('k') | chrome/common/extensions/command.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 "chrome/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 // Add the supported codecs as if they came from the component manifest. 184 // Add the supported codecs as if they came from the component manifest.
185 std::vector<std::string> codecs; 185 std::vector<std::string> codecs;
186 codecs.push_back(kCdmSupportedCodecVorbis); 186 codecs.push_back(kCdmSupportedCodecVorbis);
187 codecs.push_back(kCdmSupportedCodecVp8); 187 codecs.push_back(kCdmSupportedCodecVp8);
188 codecs.push_back(kCdmSupportedCodecVp9); 188 codecs.push_back(kCdmSupportedCodecVp9);
189 #if defined(USE_PROPRIETARY_CODECS) 189 #if defined(USE_PROPRIETARY_CODECS)
190 codecs.push_back(kCdmSupportedCodecAac); 190 codecs.push_back(kCdmSupportedCodecAac);
191 codecs.push_back(kCdmSupportedCodecAvc1); 191 codecs.push_back(kCdmSupportedCodecAvc1);
192 #endif // defined(USE_PROPRIETARY_CODECS) 192 #endif // defined(USE_PROPRIETARY_CODECS)
193 std::string codec_string = 193 std::string codec_string = base::JoinString(
194 JoinString(codecs, kCdmSupportedCodecsValueDelimiter); 194 codecs, base::string16(1, kCdmSupportedCodecsValueDelimiter));
195 widevine_cdm_mime_type.additional_param_names.push_back( 195 widevine_cdm_mime_type.additional_param_names.push_back(
196 base::ASCIIToUTF16(kCdmSupportedCodecsParamName)); 196 base::ASCIIToUTF16(kCdmSupportedCodecsParamName));
197 widevine_cdm_mime_type.additional_param_values.push_back( 197 widevine_cdm_mime_type.additional_param_values.push_back(
198 base::ASCIIToUTF16(codec_string)); 198 base::ASCIIToUTF16(codec_string));
199 199
200 widevine_cdm.mime_types.push_back(widevine_cdm_mime_type); 200 widevine_cdm.mime_types.push_back(widevine_cdm_mime_type);
201 widevine_cdm.permissions = kWidevineCdmPluginPermissions; 201 widevine_cdm.permissions = kWidevineCdmPluginPermissions;
202 plugins->push_back(widevine_cdm); 202 plugins->push_back(widevine_cdm);
203 203
204 skip_widevine_cdm_file_check = true; 204 skip_widevine_cdm_file_check = true;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 flash_version_numbers[0] = "11"; 248 flash_version_numbers[0] = "11";
249 if (flash_version_numbers.size() < 2) 249 if (flash_version_numbers.size() < 2)
250 flash_version_numbers.push_back("2"); 250 flash_version_numbers.push_back("2");
251 if (flash_version_numbers.size() < 3) 251 if (flash_version_numbers.size() < 3)
252 flash_version_numbers.push_back("999"); 252 flash_version_numbers.push_back("999");
253 if (flash_version_numbers.size() < 4) 253 if (flash_version_numbers.size() < 4)
254 flash_version_numbers.push_back("999"); 254 flash_version_numbers.push_back("999");
255 // E.g., "Shockwave Flash 10.2 r154": 255 // E.g., "Shockwave Flash 10.2 r154":
256 plugin.description = plugin.name + " " + flash_version_numbers[0] + "." + 256 plugin.description = plugin.name + " " + flash_version_numbers[0] + "." +
257 flash_version_numbers[1] + " r" + flash_version_numbers[2]; 257 flash_version_numbers[1] + " r" + flash_version_numbers[2];
258 plugin.version = JoinString(flash_version_numbers, '.'); 258 plugin.version = base::JoinString(flash_version_numbers, ".");
259 content::WebPluginMimeType swf_mime_type(content::kFlashPluginSwfMimeType, 259 content::WebPluginMimeType swf_mime_type(content::kFlashPluginSwfMimeType,
260 content::kFlashPluginSwfExtension, 260 content::kFlashPluginSwfExtension,
261 content::kFlashPluginSwfDescription); 261 content::kFlashPluginSwfDescription);
262 plugin.mime_types.push_back(swf_mime_type); 262 plugin.mime_types.push_back(swf_mime_type);
263 content::WebPluginMimeType spl_mime_type(content::kFlashPluginSplMimeType, 263 content::WebPluginMimeType spl_mime_type(content::kFlashPluginSplMimeType,
264 content::kFlashPluginSplExtension, 264 content::kFlashPluginSplExtension,
265 content::kFlashPluginSplDescription); 265 content::kFlashPluginSplDescription);
266 plugin.mime_types.push_back(spl_mime_type); 266 plugin.mime_types.push_back(spl_mime_type);
267 267
268 return plugin; 268 return plugin;
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 #endif 578 #endif
579 579
580 void ChromeContentClient::AddSecureSchemesAndOrigins( 580 void ChromeContentClient::AddSecureSchemesAndOrigins(
581 std::set<std::string>* schemes, 581 std::set<std::string>* schemes,
582 std::set<GURL>* origins) { 582 std::set<GURL>* origins) {
583 schemes->insert(content::kChromeUIScheme); 583 schemes->insert(content::kChromeUIScheme);
584 schemes->insert(extensions::kExtensionScheme); 584 schemes->insert(extensions::kExtensionScheme);
585 schemes->insert(extensions::kExtensionResourceScheme); 585 schemes->insert(extensions::kExtensionResourceScheme);
586 GetSecureOriginWhitelist(origins); 586 GetSecureOriginWhitelist(origins);
587 } 587 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/gcm_internals_ui.cc ('k') | chrome/common/extensions/command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698