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

Unified Diff: remoting/host/desktop_environment.cc

Issue 9829006: [chromoting] Fix crash when generating access code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/desktop_environment.cc
diff --git a/remoting/host/desktop_environment.cc b/remoting/host/desktop_environment.cc
index 75e784b8b3b7d5d6217372e861d9121eb172da93..3c5f5624db2f1304f454840efe9a4722e17895c3 100644
--- a/remoting/host/desktop_environment.cc
+++ b/remoting/host/desktop_environment.cc
@@ -30,6 +30,25 @@ scoped_ptr<DesktopEnvironment> DesktopEnvironment::Create(
return scoped_ptr<DesktopEnvironment>();
}
+ return scoped_ptr<DesktopEnvironment>(
+ new DesktopEnvironment(context,
+ capturer.Pass(),
+ event_executor.Pass()));
+}
+
+// static
+scoped_ptr<DesktopEnvironment> DesktopEnvironment::CreateForService(
alexeypa (please no reviews) 2012/03/21 23:39:12 Oh, well. I guess it is better to have two copies
+ ChromotingHostContext* context) {
+ scoped_ptr<Capturer> capturer(Capturer::Create());
+ scoped_ptr<protocol::HostEventStub> event_executor =
+ EventExecutor::Create(context->desktop_message_loop(),
+ capturer.get());
+
+ if (capturer.get() == NULL || event_executor.get() == NULL) {
+ LOG(ERROR) << "Unable to create DesktopEnvironment";
+ return scoped_ptr<DesktopEnvironment>();
+ }
+
#if defined(USE_CHROMOTING_IPC)
event_executor.reset(new SessionEventExecutorWin(
context->desktop_message_loop(),

Powered by Google App Engine
This is Rietveld 408576698