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

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

Issue 370943002: Don't pass a string16 to %s. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "build/intsafe_workaround.h" 5 #include "build/intsafe_workaround.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <atlctl.h> 9 #include <atlctl.h>
10 #include <initguid.h> 10 #include <initguid.h>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 base::win::ScopedComPtr<IUnknown> instance_; 86 base::win::ScopedComPtr<IUnknown> instance_;
87 DWORD registration_token_; 87 DWORD registration_token_;
88 }; 88 };
89 89
90 DelegateExecuteModule _AtlModule; 90 DelegateExecuteModule _AtlModule;
91 91
92 using delegate_execute::DelegateExecuteOperation; 92 using delegate_execute::DelegateExecuteOperation;
93 using base::win::ScopedHandle; 93 using base::win::ScopedHandle;
94 94
95 int RelaunchChrome(const DelegateExecuteOperation& operation) { 95 int RelaunchChrome(const DelegateExecuteOperation& operation) {
96 AtlTrace("Relaunching [%ls] with flags [%s]\n", 96 AtlTrace("Relaunching [%ls] with flags [%ls]\n",
97 operation.mutex().c_str(), operation.relaunch_flags()); 97 operation.mutex().c_str(), operation.relaunch_flags().c_str());
98 ScopedHandle mutex(OpenMutexW(SYNCHRONIZE, FALSE, operation.mutex().c_str())); 98 ScopedHandle mutex(OpenMutexW(SYNCHRONIZE, FALSE, operation.mutex().c_str()));
99 if (mutex.IsValid()) { 99 if (mutex.IsValid()) {
100 const int kWaitSeconds = 5; 100 const int kWaitSeconds = 5;
101 DWORD result = ::WaitForSingleObject(mutex, kWaitSeconds * 1000); 101 DWORD result = ::WaitForSingleObject(mutex, kWaitSeconds * 1000);
102 if (result == WAIT_ABANDONED) { 102 if (result == WAIT_ABANDONED) {
103 // This is the normal case. Chrome exits and windows marks the mutex as 103 // This is the normal case. Chrome exits and windows marks the mutex as
104 // abandoned. 104 // abandoned.
105 } else if (result == WAIT_OBJECT_0) { 105 } else if (result == WAIT_OBJECT_0) {
106 // This is unexpected. Check if somebody is not closing the mutex on 106 // This is unexpected. Check if somebody is not closing the mutex on
107 // RelaunchChromehelper, the mutex should not be closed. 107 // RelaunchChromehelper, the mutex should not be closed.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 case DelegateExecuteOperation::RELAUNCH_CHROME: 156 case DelegateExecuteOperation::RELAUNCH_CHROME:
157 ret_code = RelaunchChrome(operation); 157 ret_code = RelaunchChrome(operation);
158 break; 158 break;
159 default: 159 default:
160 NOTREACHED(); 160 NOTREACHED();
161 } 161 }
162 } 162 }
163 AtlTrace("delegate_execute exit, code = %d\n", ret_code); 163 AtlTrace("delegate_execute exit, code = %d\n", ret_code);
164 return ret_code; 164 return ret_code;
165 } 165 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698