| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e6823f06b5bf95c504b1399178cff880def34b9a
|
| --- /dev/null
|
| +++ b/win8/delegate_execute/delegate_execute_operation.cc
|
| @@ -0,0 +1,37 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "win8/delegate_execute/delegate_execute_operation.h"
|
| +
|
| +#include "base/command_line.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| +
|
| +namespace delegate_execute {
|
| +
|
| +DelegateExecuteOperation::DelegateExecuteOperation()
|
| + : operation_type_(EXE_MODULE) {
|
| +}
|
| +
|
| +DelegateExecuteOperation::~DelegateExecuteOperation() {
|
| + Clear();
|
| +}
|
| +
|
| +void DelegateExecuteOperation::Initialize(const CommandLine* command_line) {
|
| + Clear();
|
| +
|
| + // --relaunch-shortcut=PathToShortcut triggers the relaunch Chrome operation.
|
| + FilePath shortcut(
|
| + command_line->GetSwitchValuePath(switches::kRelaunchShortcut));
|
| + if (!shortcut.empty()) {
|
| + relaunch_shortcut_ = shortcut;
|
| + operation_type_ = RELAUNCH_CHROME;
|
| + }
|
| +}
|
| +
|
| +void DelegateExecuteOperation::Clear() {
|
| + operation_type_ = EXE_MODULE;
|
| + relaunch_shortcut_.clear();
|
| +}
|
| +
|
| +} // namespace delegate_execute
|
|
|