Chromium Code Reviews| Index: chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc |
| diff --git a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc |
| index 6be11b895d9e117c323bd0ae6afa70ac9287a08e..c1ade051ed8f39b0921422c5846d9d9d993b1b6f 100644 |
| --- a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc |
| +++ b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc |
| @@ -16,9 +16,9 @@ |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/extensions/app_launch_params.h" |
| #include "chrome/browser/ui/extensions/application_launch.h" |
| -#include "chrome/common/chrome_switches.h" |
| #include "chrome/common/extensions/extension_constants.h" |
| #include "chrome/grit/browser_resources.h" |
| +#include "chromeos/chromeos_switches.h" |
| #include "chromeos/network/network_handler.h" |
| #include "chromeos/network/network_state_handler.h" |
| #include "components/user_manager/user_manager.h" |
| @@ -38,8 +38,14 @@ const base::FilePath::CharType kDefaultDemoAppPath[] = |
| base::FilePath* DemoAppLauncher::demo_app_path_ = NULL; |
| DemoAppLauncher::DemoAppLauncher() { |
| - if (!demo_app_path_) |
| - demo_app_path_ = new base::FilePath(kDefaultDemoAppPath); |
| + if (!demo_app_path_) { |
| + CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| + const std::string demo_app_path = |
| + command_line->HasSwitch(switches::kDemoModeAppPath) |
|
bartfab (slow)
2014/11/27 16:25:47
Why is this switch being introduced as part of the
rkc
2014/12/01 19:15:04
It helps in testing this code. It doesn't need to
|
| + ? command_line->GetSwitchValueASCII(switches::kDemoModeAppPath) |
| + : kDefaultDemoAppPath; |
| + demo_app_path_ = new base::FilePath(demo_app_path); |
| + } |
| } |
| DemoAppLauncher::~DemoAppLauncher() { |