OLD | NEW |
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 "chrome/service/service_process.h" | 5 #include "chrome/service/service_process.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // terminate. | 257 // terminate. |
258 if (!ForceServiceProcessShutdown("", 0)) { | 258 if (!ForceServiceProcessShutdown("", 0)) { |
259 Terminate(); | 259 Terminate(); |
260 } | 260 } |
261 #else | 261 #else |
262 Terminate(); | 262 Terminate(); |
263 #endif | 263 #endif |
264 } | 264 } |
265 | 265 |
266 void ServiceProcess::Terminate() { | 266 void ServiceProcess::Terminate() { |
267 main_message_loop_->task_runner()->PostTask(FROM_HERE, | 267 main_message_loop_->task_runner()->PostTask( |
268 base::MessageLoop::QuitClosure()); | 268 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
269 } | 269 } |
270 | 270 |
271 void ServiceProcess::OnShutdown() { | 271 void ServiceProcess::OnShutdown() { |
272 Shutdown(); | 272 Shutdown(); |
273 } | 273 } |
274 | 274 |
275 void ServiceProcess::OnUpdateAvailable() { | 275 void ServiceProcess::OnUpdateAvailable() { |
276 update_available_ = true; | 276 update_available_ = true; |
277 } | 277 } |
278 | 278 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } else { | 362 } else { |
363 Shutdown(); | 363 Shutdown(); |
364 } | 364 } |
365 } | 365 } |
366 } | 366 } |
367 | 367 |
368 ServiceProcess::~ServiceProcess() { | 368 ServiceProcess::~ServiceProcess() { |
369 Teardown(); | 369 Teardown(); |
370 g_service_process = NULL; | 370 g_service_process = NULL; |
371 } | 371 } |
OLD | NEW |