| Index: win8/delegate_execute/delegate_execute_operation.cc
|
| diff --git a/win8/delegate_execute/delegate_execute_operation.cc b/win8/delegate_execute/delegate_execute_operation.cc
|
| index f2ba2c47ac101a103b3dea4c1f7859625e54c732..0f52ace5e21c20ae040b69a3685c02b7db56de51 100644
|
| --- a/win8/delegate_execute/delegate_execute_operation.cc
|
| +++ b/win8/delegate_execute/delegate_execute_operation.cc
|
| @@ -7,13 +7,19 @@
|
| #include "base/command_line.h"
|
| #include "base/string_number_conversions.h"
|
| #include "base/string_split.h"
|
| +#include "base/utf_string_conversions.h"
|
| #include "chrome/common/chrome_switches.h"
|
|
|
| +namespace {
|
| +
|
| +const wchar_t kSwitchPrefix[] = L"--";
|
| +
|
| +} // namespace
|
| +
|
| namespace delegate_execute {
|
|
|
| DelegateExecuteOperation::DelegateExecuteOperation()
|
| - : operation_type_(DELEGATE_EXECUTE),
|
| - relaunch_flags_("") {
|
| + : operation_type_(DELEGATE_EXECUTE) {
|
| }
|
|
|
| DelegateExecuteOperation::~DelegateExecuteOperation() {
|
| @@ -31,9 +37,11 @@ bool DelegateExecuteOperation::Init(const CommandLine* cmd_line) {
|
| return false;
|
| // Add the mode forcing flags, if any.
|
| if (cmd_line->HasSwitch(switches::kForceDesktop))
|
| - relaunch_flags_ = switches::kForceDesktop;
|
| + relaunch_flags_ = kSwitchPrefix + ASCIIToWide(switches::kForceDesktop);
|
| else if (cmd_line->HasSwitch(switches::kForceImmersive))
|
| - relaunch_flags_ = switches::kForceImmersive;
|
| + relaunch_flags_ = kSwitchPrefix + ASCIIToWide(switches::kForceImmersive);
|
| + else
|
| + relaunch_flags_.clear();
|
|
|
| operation_type_ = RELAUNCH_CHROME;
|
| return true;
|
|
|