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

Side by Side Diff: chrome/chrome_watcher/chrome_watcher_main.cc

Issue 2041033003: clang-tidy WaitableEvent refactor (Android side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0_windows
Patch Set: 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 <windows.h> 5 #include <windows.h>
6 #include <sddl.h> 6 #include <sddl.h>
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 DISALLOW_COPY_AND_ASSIGN(BrowserMonitor); 94 DISALLOW_COPY_AND_ASSIGN(BrowserMonitor);
95 }; 95 };
96 96
97 BrowserMonitor::BrowserMonitor(base::StringPiece16 registry_path, 97 BrowserMonitor::BrowserMonitor(base::StringPiece16 registry_path,
98 base::RunLoop* run_loop) 98 base::RunLoop* run_loop)
99 : exit_code_watcher_(registry_path), 99 : exit_code_watcher_(registry_path),
100 end_session_watcher_window_( 100 end_session_watcher_window_(
101 base::Bind(&BrowserMonitor::OnEndSessionMessage, 101 base::Bind(&BrowserMonitor::OnEndSessionMessage,
102 base::Unretained(this))), 102 base::Unretained(this))),
103 background_thread_("BrowserWatcherThread"), 103 background_thread_("BrowserWatcherThread"),
104 browser_exited_( 104 browser_exited_(base::WaitableEvent::ResetPolicy::MANUAL,
105 base::WaitableEvent::ResetPolicy::MANUAL, 105 base::WaitableEvent::InitialState::NOT_SIGNALED),
106 base::WaitableEvent::InitialState::NOT_SIGNALED),
107 run_loop_(run_loop), 106 run_loop_(run_loop),
108 main_thread_(base::ThreadTaskRunnerHandle::Get()) {} 107 main_thread_(base::ThreadTaskRunnerHandle::Get()) {}
109 108
110 BrowserMonitor::~BrowserMonitor() { 109 BrowserMonitor::~BrowserMonitor() {
111 } 110 }
112 111
113 bool BrowserMonitor::StartWatching( 112 bool BrowserMonitor::StartWatching(
114 base::Process process, 113 base::Process process,
115 base::win::ScopedHandle on_initialized_event) { 114 base::win::ScopedHandle on_initialized_event) {
116 if (!exit_code_watcher_.Initialize(std::move(process))) 115 if (!exit_code_watcher_.Initialize(std::move(process)))
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 259
261 // Wind logging down. 260 // Wind logging down.
262 logging::LogEventProvider::Uninitialize(); 261 logging::LogEventProvider::Uninitialize();
263 262
264 return 0; 263 return 0;
265 } 264 }
266 265
267 static_assert( 266 static_assert(
268 std::is_same<decltype(&WatcherMain), ChromeWatcherMainFunction>::value, 267 std::is_same<decltype(&WatcherMain), ChromeWatcherMainFunction>::value,
269 "WatcherMain() has wrong type"); 268 "WatcherMain() has wrong type");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698