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

Side by Side Diff: remoting/host/desktop_session_win.cc

Issue 2468523003: Pass the desktop session ID to the remoting network process. (Closed)
Patch Set: rebase Created 4 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 | « remoting/host/desktop_session_win.h ('k') | remoting/host/ipc_desktop_environment.h » ('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/desktop_session_win.h" 5 #include "remoting/host/desktop_session_win.h"
6 6
7 #include <sddl.h> 7 #include <sddl.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <memory> 10 #include <memory>
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 io_task_runner_, std::move(target), launch_elevated, 651 io_task_runner_, std::move(target), launch_elevated,
652 base::WideToUTF8(kDaemonIpcSecurityDescriptor), 652 base::WideToUTF8(kDaemonIpcSecurityDescriptor),
653 base::WideToUTF8(kDesktopProcessSecurityDescriptor))); 653 base::WideToUTF8(kDesktopProcessSecurityDescriptor)));
654 if (!delegate->Initialize(session_id)) { 654 if (!delegate->Initialize(session_id)) {
655 TerminateSession(); 655 TerminateSession();
656 return; 656 return;
657 } 657 }
658 658
659 // Create a launcher for the desktop process, using the per-session delegate. 659 // Create a launcher for the desktop process, using the per-session delegate.
660 launcher_.reset(new WorkerProcessLauncher(std::move(delegate), this)); 660 launcher_.reset(new WorkerProcessLauncher(std::move(delegate), this));
661 session_id_ = session_id;
661 } 662 }
662 663
663 void DesktopSessionWin::OnSessionDetached() { 664 void DesktopSessionWin::OnSessionDetached() {
664 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 665 DCHECK(caller_task_runner_->BelongsToCurrentThread());
665 666
666 launcher_.reset(); 667 launcher_.reset();
668 session_id_ = UINT32_MAX;
667 669
668 if (monitoring_notifications_) { 670 if (monitoring_notifications_) {
669 ReportElapsedTime("detached"); 671 ReportElapsedTime("detached");
670 672
671 session_attach_timer_.Start( 673 session_attach_timer_.Start(
672 FROM_HERE, base::TimeDelta::FromSeconds(kSessionAttachTimeoutSeconds), 674 FROM_HERE, base::TimeDelta::FromSeconds(kSessionAttachTimeoutSeconds),
673 this, &DesktopSessionWin::OnSessionAttachTimeout); 675 this, &DesktopSessionWin::OnSessionAttachTimeout);
674 } 676 }
675 } 677 }
676 678
677 void DesktopSessionWin::OnDesktopSessionAgentAttached( 679 void DesktopSessionWin::OnDesktopSessionAgentAttached(
678 const IPC::ChannelHandle& desktop_pipe) { 680 const IPC::ChannelHandle& desktop_pipe) {
679 if (!daemon_process()->OnDesktopSessionAgentAttached(id(), desktop_pipe)) { 681 if (!daemon_process()->OnDesktopSessionAgentAttached(id(), session_id_,
682 desktop_pipe)) {
680 CrashDesktopProcess(FROM_HERE); 683 CrashDesktopProcess(FROM_HERE);
681 } 684 }
682 } 685 }
683 686
684 void DesktopSessionWin::CrashDesktopProcess( 687 void DesktopSessionWin::CrashDesktopProcess(
685 const tracked_objects::Location& location) { 688 const tracked_objects::Location& location) {
686 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 689 DCHECK(caller_task_runner_->BelongsToCurrentThread());
687 690
688 launcher_->Crash(location); 691 launcher_->Crash(location);
689 } 692 }
(...skipping 15 matching lines...) Expand all
705 exploded.hour, 708 exploded.hour,
706 exploded.minute, 709 exploded.minute,
707 exploded.second, 710 exploded.second,
708 exploded.millisecond, 711 exploded.millisecond,
709 passed.c_str()); 712 passed.c_str());
710 713
711 last_timestamp_ = now; 714 last_timestamp_ = now;
712 } 715 }
713 716
714 } // namespace remoting 717 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_win.h ('k') | remoting/host/ipc_desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698