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

Unified Diff: chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698