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

Side by Side Diff: chrome/common/service_process_util_win.cc

Issue 606473002: Remove implicit HANDLE conversions from chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove spurious file and fix indent (+rebase) Created 6 years, 2 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 | « chrome/browser/process_singleton_win.cc ('k') | chrome/installer/gcapi/gcapi.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/common/service_process_util.h" 5 #include "chrome/common/service_process_util.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return true; 96 return true;
97 } 97 }
98 98
99 bool CheckServiceProcessReady() { 99 bool CheckServiceProcessReady() {
100 base::string16 event_name = GetServiceProcessReadyEventName(); 100 base::string16 event_name = GetServiceProcessReadyEventName();
101 base::win::ScopedHandle event( 101 base::win::ScopedHandle event(
102 OpenEvent(SYNCHRONIZE | READ_CONTROL, false, event_name.c_str())); 102 OpenEvent(SYNCHRONIZE | READ_CONTROL, false, event_name.c_str()));
103 if (!event.IsValid()) 103 if (!event.IsValid())
104 return false; 104 return false;
105 // Check if the event is signaled. 105 // Check if the event is signaled.
106 return WaitForSingleObject(event, 0) == WAIT_OBJECT_0; 106 return WaitForSingleObject(event.Get(), 0) == WAIT_OBJECT_0;
107 } 107 }
108 108
109 struct ServiceProcessState::StateData { 109 struct ServiceProcessState::StateData {
110 // An event that is signaled when a service process is ready. 110 // An event that is signaled when a service process is ready.
111 base::win::ScopedHandle ready_event; 111 base::win::ScopedHandle ready_event;
112 scoped_ptr<ServiceProcessTerminateMonitor> terminate_monitor; 112 scoped_ptr<ServiceProcessTerminateMonitor> terminate_monitor;
113 }; 113 };
114 114
115 void ServiceProcessState::CreateState() { 115 void ServiceProcessState::CreateState() {
116 DCHECK(!state_); 116 DCHECK(!state_);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 HKEY_CURRENT_USER, 168 HKEY_CURRENT_USER,
169 base::UTF8ToWide(GetObsoleteServiceProcessAutoRunKey())); 169 base::UTF8ToWide(GetObsoleteServiceProcessAutoRunKey()));
170 return base::win::RemoveCommandFromAutoRun( 170 return base::win::RemoveCommandFromAutoRun(
171 HKEY_CURRENT_USER, base::UTF8ToWide(GetServiceProcessAutoRunKey())); 171 HKEY_CURRENT_USER, base::UTF8ToWide(GetServiceProcessAutoRunKey()));
172 } 172 }
173 173
174 void ServiceProcessState::TearDownState() { 174 void ServiceProcessState::TearDownState() {
175 delete state_; 175 delete state_;
176 state_ = NULL; 176 state_ = NULL;
177 } 177 }
OLDNEW
« no previous file with comments | « chrome/browser/process_singleton_win.cc ('k') | chrome/installer/gcapi/gcapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698