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

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

Issue 1167163002: chrome: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added some missing message_loop.h includes. Created 5 years, 6 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/common/service_process_util_unittest.cc ('k') | chrome/common/worker_thread_ticker.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 service_process_ready_event.Set( 125 service_process_ready_event.Set(
126 CreateEvent(NULL, TRUE, FALSE, event_name.c_str())); 126 CreateEvent(NULL, TRUE, FALSE, event_name.c_str()));
127 DWORD error = GetLastError(); 127 DWORD error = GetLastError();
128 if ((error == ERROR_ALREADY_EXISTS) || (error == ERROR_ACCESS_DENIED)) 128 if ((error == ERROR_ALREADY_EXISTS) || (error == ERROR_ACCESS_DENIED))
129 return false; 129 return false;
130 DCHECK(service_process_ready_event.IsValid()); 130 DCHECK(service_process_ready_event.IsValid());
131 state_->ready_event.Set(service_process_ready_event.Take()); 131 state_->ready_event.Set(service_process_ready_event.Take());
132 return true; 132 return true;
133 } 133 }
134 134
135 bool ServiceProcessState::SignalReady( 135 bool ServiceProcessState::SignalReady(base::SingleThreadTaskRunner* task_runner,
136 base::MessageLoopProxy* message_loop_proxy, 136 const base::Closure& terminate_task) {
137 const base::Closure& terminate_task) {
138 DCHECK(state_); 137 DCHECK(state_);
139 DCHECK(state_->ready_event.IsValid()); 138 DCHECK(state_->ready_event.IsValid());
140 if (!SetEvent(state_->ready_event.Get())) { 139 if (!SetEvent(state_->ready_event.Get())) {
141 return false; 140 return false;
142 } 141 }
143 if (!terminate_task.is_null()) { 142 if (!terminate_task.is_null()) {
144 state_->terminate_monitor.reset( 143 state_->terminate_monitor.reset(
145 new ServiceProcessTerminateMonitor(terminate_task)); 144 new ServiceProcessTerminateMonitor(terminate_task));
146 state_->terminate_monitor->Start(); 145 state_->terminate_monitor->Start();
147 } 146 }
(...skipping 20 matching lines...) Expand all
168 HKEY_CURRENT_USER, 167 HKEY_CURRENT_USER,
169 base::UTF8ToWide(GetObsoleteServiceProcessAutoRunKey())); 168 base::UTF8ToWide(GetObsoleteServiceProcessAutoRunKey()));
170 return base::win::RemoveCommandFromAutoRun( 169 return base::win::RemoveCommandFromAutoRun(
171 HKEY_CURRENT_USER, base::UTF8ToWide(GetServiceProcessAutoRunKey())); 170 HKEY_CURRENT_USER, base::UTF8ToWide(GetServiceProcessAutoRunKey()));
172 } 171 }
173 172
174 void ServiceProcessState::TearDownState() { 173 void ServiceProcessState::TearDownState() {
175 delete state_; 174 delete state_;
176 state_ = NULL; 175 state_ = NULL;
177 } 176 }
OLDNEW
« no previous file with comments | « chrome/common/service_process_util_unittest.cc ('k') | chrome/common/worker_thread_ticker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698