OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "win8/delegate_execute/delegate_execute_operation.h" |
| 6 |
| 7 #include "base/command_line.h" |
| 8 #include "chrome/common/chrome_switches.h" |
| 9 |
| 10 namespace delegate_execute { |
| 11 |
| 12 DelegateExecuteOperation::DelegateExecuteOperation() |
| 13 : operation_type_(EXE_MODULE) { |
| 14 } |
| 15 |
| 16 DelegateExecuteOperation::~DelegateExecuteOperation() { |
| 17 Clear(); |
| 18 } |
| 19 |
| 20 void DelegateExecuteOperation::Initialize(const CommandLine* command_line) { |
| 21 Clear(); |
| 22 |
| 23 // --relaunch-shortcut=PathToShortcut triggers the relaunch Chrome operation. |
| 24 FilePath shortcut( |
| 25 command_line->GetSwitchValuePath(switches::kRelaunchShortcut)); |
| 26 if (!shortcut.empty()) { |
| 27 relaunch_shortcut_ = shortcut; |
| 28 operation_type_ = RELAUNCH_CHROME; |
| 29 } |
| 30 } |
| 31 |
| 32 void DelegateExecuteOperation::Clear() { |
| 33 operation_type_ = EXE_MODULE; |
| 34 relaunch_shortcut_.clear(); |
| 35 } |
| 36 |
| 37 } // namespace delegate_execute |
OLD | NEW |