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

Side by Side Diff: chrome/service/service_process.cc

Issue 2021393004: Migrate WaitableEvent to enum-based constructor in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Split out custom changes to thread_watcher_unittest.cc Created 4 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
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 "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/callback.h" 10 #include "base/callback.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 dlg_strings.push_back('|'); 113 dlg_strings.push_back('|');
114 dlg_strings.append(base::ASCIIToUTF16( 114 dlg_strings.append(base::ASCIIToUTF16(
115 base::i18n::IsRTL() ? env_vars::kRtlLocale : env_vars::kLtrLocale)); 115 base::i18n::IsRTL() ? env_vars::kRtlLocale : env_vars::kLtrLocale));
116 116
117 env->SetVar(env_vars::kRestartInfo, base::UTF16ToUTF8(dlg_strings)); 117 env->SetVar(env_vars::kRestartInfo, base::UTF16ToUTF8(dlg_strings));
118 } 118 }
119 119
120 } // namespace 120 } // namespace
121 121
122 ServiceProcess::ServiceProcess() 122 ServiceProcess::ServiceProcess()
123 : shutdown_event_(true /* manual_reset */, false /* initially_signaled */), 123 : shutdown_event_(base::WaitableEvent::ResetPolicy::MANUAL,
124 base::WaitableEvent::InitialState::NOT_SIGNALED),
124 main_message_loop_(NULL), 125 main_message_loop_(NULL),
125 enabled_services_(0), 126 enabled_services_(0),
126 update_available_(false) { 127 update_available_(false) {
127 DCHECK(!g_service_process); 128 DCHECK(!g_service_process);
128 g_service_process = this; 129 g_service_process = this;
129 } 130 }
130 131
131 bool ServiceProcess::Initialize(base::MessageLoopForUI* message_loop, 132 bool ServiceProcess::Initialize(base::MessageLoopForUI* message_loop,
132 const base::CommandLine& command_line, 133 const base::CommandLine& command_line,
133 ServiceProcessState* state) { 134 ServiceProcessState* state) {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } else { 368 } else {
368 Shutdown(); 369 Shutdown();
369 } 370 }
370 } 371 }
371 } 372 }
372 373
373 ServiceProcess::~ServiceProcess() { 374 ServiceProcess::~ServiceProcess() {
374 Teardown(); 375 Teardown();
375 g_service_process = NULL; 376 g_service_process = NULL;
376 } 377 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698