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

Side by Side Diff: chrome/browser/plugin_process_host.cc

Issue 373013: Use GetSwitchValueASCII. (Closed)
Patch Set: Created 11 years, 1 month 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/nacl_process_host.cc ('k') | chrome/browser/plugin_service.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/plugin_process_host.h" 7 #include "chrome/browser/plugin_process_host.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 switches::kUseLowFragHeapCrt, 395 switches::kUseLowFragHeapCrt,
396 switches::kEnableStatsTable, 396 switches::kEnableStatsTable,
397 }; 397 };
398 398
399 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 399 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
400 400
401 for (size_t i = 0; i < arraysize(switch_names); ++i) { 401 for (size_t i = 0; i < arraysize(switch_names); ++i) {
402 if (browser_command_line.HasSwitch(switch_names[i])) { 402 if (browser_command_line.HasSwitch(switch_names[i])) {
403 cmd_line.AppendSwitchWithValue( 403 cmd_line.AppendSwitchWithValue(
404 switch_names[i], 404 switch_names[i],
405 browser_command_line.GetSwitchValue(switch_names[i])); 405 browser_command_line.GetSwitchValueASCII(switch_names[i]));
406 } 406 }
407 } 407 }
408 408
409 // If specified, prepend a launcher program to the command line. 409 // If specified, prepend a launcher program to the command line.
410 std::wstring plugin_launcher = 410 std::wstring plugin_launcher =
411 browser_command_line.GetSwitchValue(switches::kPluginLauncher); 411 browser_command_line.GetSwitchValue(switches::kPluginLauncher);
412 if (!plugin_launcher.empty()) 412 if (!plugin_launcher.empty())
413 cmd_line.PrependWrapper(plugin_launcher); 413 cmd_line.PrependWrapper(plugin_launcher);
414 414
415 if (!locale.empty()) { 415 if (!locale.empty()) {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 const std::vector<uint8>& data) { 672 const std::vector<uint8>& data) {
673 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 673 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
674 674
675 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path); 675 ChromePluginLib *chrome_plugin = ChromePluginLib::Find(info_.path);
676 if (chrome_plugin) { 676 if (chrome_plugin) {
677 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0])); 677 void *data_ptr = const_cast<void*>(reinterpret_cast<const void*>(&data[0]));
678 uint32 data_len = static_cast<uint32>(data.size()); 678 uint32 data_len = static_cast<uint32>(data.size());
679 chrome_plugin->functions().on_message(data_ptr, data_len); 679 chrome_plugin->functions().on_message(data_ptr, data_len);
680 } 680 }
681 } 681 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_process_host.cc ('k') | chrome/browser/plugin_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698