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

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

Issue 10808094: Always use chromium threads for IO in remoting host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/log_to_server.cc ('k') | remoting/host/register_support_host_request.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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 SetState(kError); 542 SetState(kError);
543 return; 543 return;
544 } 544 }
545 545
546 // Generate a key pair for the Host to use. 546 // Generate a key pair for the Host to use.
547 // TODO(wez): Move this to the worker thread. 547 // TODO(wez): Move this to the worker thread.
548 host_key_pair_.Generate(); 548 host_key_pair_.Generate();
549 549
550 // Create XMPP connection. 550 // Create XMPP connection.
551 scoped_ptr<SignalStrategy> signal_strategy( 551 scoped_ptr<SignalStrategy> signal_strategy(
552 new XmppSignalStrategy(host_context_->jingle_thread(), uid, 552 new XmppSignalStrategy(host_context_->url_request_context_getter(),
553 auth_token, auth_service)); 553 uid, auth_token, auth_service));
554 554
555 // Request registration of the host for support. 555 // Request registration of the host for support.
556 scoped_ptr<RegisterSupportHostRequest> register_request( 556 scoped_ptr<RegisterSupportHostRequest> register_request(
557 new RegisterSupportHostRequest( 557 new RegisterSupportHostRequest(
558 signal_strategy.get(), &host_key_pair_, 558 signal_strategy.get(), &host_key_pair_,
559 base::Bind(&HostNPScriptObject::OnReceivedSupportID, 559 base::Bind(&HostNPScriptObject::OnReceivedSupportID,
560 base::Unretained(this)))); 560 base::Unretained(this))));
561 561
562 // Beyond this point nothing can fail, so save the config and request. 562 // Beyond this point nothing can fail, so save the config and request.
563 signal_strategy_.reset(signal_strategy.release()); 563 signal_strategy_.reset(signal_strategy.release());
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 return is_good; 1256 return is_good;
1257 } 1257 }
1258 1258
1259 void HostNPScriptObject::SetException(const std::string& exception_string) { 1259 void HostNPScriptObject::SetException(const std::string& exception_string) {
1260 DCHECK(plugin_task_runner_->BelongsToCurrentThread()); 1260 DCHECK(plugin_task_runner_->BelongsToCurrentThread());
1261 g_npnetscape_funcs->setexception(parent_, exception_string.c_str()); 1261 g_npnetscape_funcs->setexception(parent_, exception_string.c_str());
1262 LOG(INFO) << exception_string; 1262 LOG(INFO) << exception_string;
1263 } 1263 }
1264 1264
1265 } // namespace remoting 1265 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/log_to_server.cc ('k') | remoting/host/register_support_host_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698