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

Side by Side Diff: win8/delegate_execute/delegate_execute_operation.cc

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "win8/delegate_execute/delegate_execute_operation.h" 5 #include "win8/delegate_execute/delegate_execute_operation.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
11 #include "win8/delegate_execute/delegate_execute_util.h" 11 #include "win8/delegate_execute/delegate_execute_util.h"
12 12
13 namespace delegate_execute { 13 namespace delegate_execute {
14 14
15 DelegateExecuteOperation::DelegateExecuteOperation() 15 DelegateExecuteOperation::DelegateExecuteOperation()
16 : operation_type_(DELEGATE_EXECUTE) { 16 : operation_type_(DELEGATE_EXECUTE) {
17 } 17 }
18 18
19 DelegateExecuteOperation::~DelegateExecuteOperation() { 19 DelegateExecuteOperation::~DelegateExecuteOperation() {
20 } 20 }
21 21
22 bool DelegateExecuteOperation::Init(const CommandLine* cmd_line) { 22 bool DelegateExecuteOperation::Init(const CommandLine* cmd_line) {
23 FilePath shortcut(cmd_line->GetSwitchValuePath(switches::kRelaunchShortcut)); 23 base::FilePath shortcut(
24 cmd_line->GetSwitchValuePath(switches::kRelaunchShortcut));
24 if (shortcut.empty()) { 25 if (shortcut.empty()) {
25 operation_type_ = DELEGATE_EXECUTE; 26 operation_type_ = DELEGATE_EXECUTE;
26 return true; 27 return true;
27 } 28 }
28 relaunch_shortcut_ = shortcut; 29 relaunch_shortcut_ = shortcut;
29 mutex_ = cmd_line->GetSwitchValueNative(switches::kWaitForMutex); 30 mutex_ = cmd_line->GetSwitchValueNative(switches::kWaitForMutex);
30 if (mutex_.empty()) 31 if (mutex_.empty())
31 return false; 32 return false;
32 // Add the mode forcing flags, if any. 33 // Add the mode forcing flags, if any.
33 const char* the_switch = NULL; 34 const char* the_switch = NULL;
(...skipping 14 matching lines...) Expand all
48 base::SplitString(mutex_, L'.', &parts); 49 base::SplitString(mutex_, L'.', &parts);
49 if (parts.size() != 3) 50 if (parts.size() != 3)
50 return 0; 51 return 0;
51 DWORD pid; 52 DWORD pid;
52 if (!base::StringToUint(parts[2], reinterpret_cast<uint32*>(&pid))) 53 if (!base::StringToUint(parts[2], reinterpret_cast<uint32*>(&pid)))
53 return 0; 54 return 0;
54 return pid; 55 return pid;
55 } 56 }
56 57
57 } // namespace delegate_execute 58 } // namespace delegate_execute
OLDNEW
« no previous file with comments | « win8/delegate_execute/delegate_execute_operation.h ('k') | win8/delegate_execute/delegate_execute_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698