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

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

Issue 9150014: Cleanup AuthenticatorFactory implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 8 years, 11 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 | « no previous file | remoting/host/remoting_me2me_host.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/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 // DisconnectInternal() later. 663 // DisconnectInternal() later.
664 host_context_.network_message_loop()->PostTask(FROM_HERE, base::Bind( 664 host_context_.network_message_loop()->PostTask(FROM_HERE, base::Bind(
665 &HostNPScriptObject::DisconnectInternal, base::Unretained(this))); 665 &HostNPScriptObject::DisconnectInternal, base::Unretained(this)));
666 return; 666 return;
667 } 667 }
668 668
669 std::string host_secret = GenerateSupportHostSecret(); 669 std::string host_secret = GenerateSupportHostSecret();
670 std::string access_code = support_id + host_secret; 670 std::string access_code = support_id + host_secret;
671 scoped_ptr<protocol::AuthenticatorFactory> factory( 671 scoped_ptr<protocol::AuthenticatorFactory> factory(
672 new protocol::It2MeHostAuthenticatorFactory( 672 new protocol::It2MeHostAuthenticatorFactory(
673 host_key_pair_.GenerateCertificate(), host_key_pair_.private_key(), 673 host_key_pair_.GenerateCertificate(), *host_key_pair_.private_key(),
674 access_code)); 674 access_code));
675 host_->SetAuthenticatorFactory(factory.Pass()); 675 host_->SetAuthenticatorFactory(factory.Pass());
676 676
677 { 677 {
678 base::AutoLock lock(access_code_lock_); 678 base::AutoLock lock(access_code_lock_);
679 access_code_ = access_code; 679 access_code_ = access_code;
680 access_code_lifetime_ = lifetime; 680 access_code_lifetime_ = lifetime;
681 } 681 }
682 682
683 SetState(kReceivedAccessCode); 683 SetState(kReceivedAccessCode);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 uint32_t argCount) { 849 uint32_t argCount) {
850 NPVariant np_result; 850 NPVariant np_result;
851 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args, 851 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args,
852 argCount, &np_result); 852 argCount, &np_result);
853 if (is_good) 853 if (is_good)
854 g_npnetscape_funcs->releasevariantvalue(&np_result); 854 g_npnetscape_funcs->releasevariantvalue(&np_result);
855 return is_good; 855 return is_good;
856 } 856 }
857 857
858 } // namespace remoting 858 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698