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

Side by Side Diff: remoting/host/plugin/host_script_object.cc

Issue 13642007: Rewrite scoped_array<T> to scoped_ptr<T[]> in remoting/, Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Manually rewrite Win files. Created 7 years, 8 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 | « remoting/host/local_input_monitor_win.cc ('k') | remoting/host/verify_config_window_win.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 "remoting/host/plugin/host_script_object.h" 5 #include "remoting/host/plugin/host_script_object.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 const char* tag, string16* result) { 1420 const char* tag, string16* result) {
1421 return LocalizeStringWithSubstitution(localize_func, tag, NULL, result); 1421 return LocalizeStringWithSubstitution(localize_func, tag, NULL, result);
1422 } 1422 }
1423 1423
1424 bool HostNPScriptObject::LocalizeStringWithSubstitution( 1424 bool HostNPScriptObject::LocalizeStringWithSubstitution(
1425 NPObject* localize_func, 1425 NPObject* localize_func,
1426 const char* tag, 1426 const char* tag,
1427 const char* substitution, 1427 const char* substitution,
1428 string16* result) { 1428 string16* result) {
1429 int argc = substitution ? 2 : 1; 1429 int argc = substitution ? 2 : 1;
1430 scoped_array<NPVariant> args(new NPVariant[argc]); 1430 scoped_ptr<NPVariant[]> args(new NPVariant[argc]);
1431 STRINGZ_TO_NPVARIANT(tag, args[0]); 1431 STRINGZ_TO_NPVARIANT(tag, args[0]);
1432 if (substitution) { 1432 if (substitution) {
1433 STRINGZ_TO_NPVARIANT(substitution, args[1]); 1433 STRINGZ_TO_NPVARIANT(substitution, args[1]);
1434 } 1434 }
1435 NPVariant np_result; 1435 NPVariant np_result;
1436 bool is_good = g_npnetscape_funcs->invokeDefault( 1436 bool is_good = g_npnetscape_funcs->invokeDefault(
1437 plugin_, localize_func, args.get(), argc, &np_result); 1437 plugin_, localize_func, args.get(), argc, &np_result);
1438 if (!is_good) { 1438 if (!is_good) {
1439 LOG(ERROR) << "Localization failed for " << tag; 1439 LOG(ERROR) << "Localization failed for " << tag;
1440 return false; 1440 return false;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 } 1584 }
1585 1585
1586 void HostNPScriptObject::SetException(const std::string& exception_string) { 1586 void HostNPScriptObject::SetException(const std::string& exception_string) {
1587 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); 1587 DCHECK(plugin_task_runner_->BelongsToCurrentThread());
1588 1588
1589 g_npnetscape_funcs->setexception(parent_, exception_string.c_str()); 1589 g_npnetscape_funcs->setexception(parent_, exception_string.c_str());
1590 LOG(INFO) << exception_string; 1590 LOG(INFO) << exception_string;
1591 } 1591 }
1592 1592
1593 } // namespace remoting 1593 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/local_input_monitor_win.cc ('k') | remoting/host/verify_config_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698