summaryrefslogtreecommitdiffstats
path: root/remoting/host/desktop_environment.h
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-22 02:56:21 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-22 02:56:21 +0000
commit6f3532ac7b8f4f6e7de0742528f7f5ee8f0e4b35 (patch)
treef7b8b8489bf812b6d9713e508a0f9937a7c829ee /remoting/host/desktop_environment.h
parent5cce2e749e5ca85ee18ec20b346a97911f56e53a (diff)
downloadchromium_src-6f3532ac7b8f4f6e7de0742528f7f5ee8f0e4b35.zip
chromium_src-6f3532ac7b8f4f6e7de0742528f7f5ee8f0e4b35.tar.gz
chromium_src-6f3532ac7b8f4f6e7de0742528f7f5ee8f0e4b35.tar.bz2
[chromoting] Fix crash when generating access code
Chromoting host plugin uses a class that accesses CommandLine::ForCurrentProcess() which returns NULL because it is not initialized Avoid this crash by having a different static constructor that creates a DesktopEnvironment not using this class. BUG=118003 TEST=Load the latest plugin, generate access code without crash Review URL: http://codereview.chromium.org/9829006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/desktop_environment.h')
-rw-r--r--remoting/host/desktop_environment.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/remoting/host/desktop_environment.h b/remoting/host/desktop_environment.h
index d3058e0..237f94b 100644
--- a/remoting/host/desktop_environment.h
+++ b/remoting/host/desktop_environment.h
@@ -25,7 +25,14 @@ class HostEventStub;
class DesktopEnvironment {
public:
- static scoped_ptr<DesktopEnvironment> Create(ChromotingHostContext* context);
+ // Creates a DesktopEnvironment used in a host plugin.
+ static scoped_ptr<DesktopEnvironment> Create(
+ ChromotingHostContext* context);
+
+ // Creates a DesktopEnvironment used in a service process.
+ static scoped_ptr<DesktopEnvironment> CreateForService(
+ ChromotingHostContext* context);
+
static scoped_ptr<DesktopEnvironment> CreateFake(
ChromotingHostContext* context,
scoped_ptr<Capturer> capturer,