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

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

Issue 8619011: Use Authenticator interface in Session and SessionManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unittests Created 9 years 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/chromoting_host.cc ('k') | remoting/host/simple_host_process.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 646
647 if (!success) { 647 if (!success) {
648 host_context_.main_message_loop()->PostTask(FROM_HERE, base::Bind( 648 host_context_.main_message_loop()->PostTask(FROM_HERE, base::Bind(
649 &HostNPScriptObject::NotifyAccessCode, base::Unretained(this), false)); 649 &HostNPScriptObject::NotifyAccessCode, base::Unretained(this), false));
650 DisconnectInternal(); 650 DisconnectInternal();
651 return; 651 return;
652 } 652 }
653 653
654 std::string host_secret = GenerateSupportHostSecret(); 654 std::string host_secret = GenerateSupportHostSecret();
655 std::string access_code = support_id + host_secret; 655 std::string access_code = support_id + host_secret;
656 host_->set_access_code(access_code); 656 host_->SetSharedSecret(access_code);
657 657
658 { 658 {
659 base::AutoLock lock(access_code_lock_); 659 base::AutoLock lock(access_code_lock_);
660 access_code_ = access_code; 660 access_code_ = access_code;
661 access_code_lifetime_ = lifetime; 661 access_code_lifetime_ = lifetime;
662 } 662 }
663 663
664 host_context_.main_message_loop()->PostTask(FROM_HERE, base::Bind( 664 host_context_.main_message_loop()->PostTask(FROM_HERE, base::Bind(
665 &HostNPScriptObject::NotifyAccessCode, base::Unretained(this), true)); 665 &HostNPScriptObject::NotifyAccessCode, base::Unretained(this), true));
666 } 666 }
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 uint32_t argCount) { 837 uint32_t argCount) {
838 NPVariant np_result; 838 NPVariant np_result;
839 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args, 839 bool is_good = g_npnetscape_funcs->invokeDefault(plugin_, func, args,
840 argCount, &np_result); 840 argCount, &np_result);
841 if (is_good) 841 if (is_good)
842 g_npnetscape_funcs->releasevariantvalue(&np_result); 842 g_npnetscape_funcs->releasevariantvalue(&np_result);
843 return is_good; 843 return is_good;
844 } 844 }
845 845
846 } // namespace remoting 846 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/simple_host_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698