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

Unified Diff: android_webview/native/cookie_manager.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/test/fake_window.cc ('k') | base/android/application_status_listener_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/cookie_manager.cc
diff --git a/android_webview/native/cookie_manager.cc b/android_webview/native/cookie_manager.cc
index e741cc4ca6d28631040c690656b7755c27bc1982..ab43638f42e8cd68a5fa9852b867a543893bd540 100644
--- a/android_webview/native/cookie_manager.cc
+++ b/android_webview/native/cookie_manager.cc
@@ -266,7 +266,8 @@ CookieManager::~CookieManager() {
// Ignore a bool callback.
void CookieManager::ExecCookieTaskSync(
const base::Callback<void(BoolCallback)>& task) {
- WaitableEvent completion(false, false);
+ WaitableEvent completion(base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
ExecCookieTask(
base::Bind(task, BoolCallbackAdapter(SignalEventClosure(&completion))));
ScopedAllowWaitForLegacyWebViewApi wait;
@@ -276,7 +277,8 @@ void CookieManager::ExecCookieTaskSync(
// Ignore an int callback.
void CookieManager::ExecCookieTaskSync(
const base::Callback<void(IntCallback)>& task) {
- WaitableEvent completion(false, false);
+ WaitableEvent completion(base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
ExecCookieTask(
base::Bind(task, IntCallbackAdapter(SignalEventClosure(&completion))));
ScopedAllowWaitForLegacyWebViewApi wait;
@@ -287,7 +289,8 @@ void CookieManager::ExecCookieTaskSync(
// continue.
void CookieManager::ExecCookieTaskSync(
const base::Callback<void(base::Closure)>& task) {
- WaitableEvent completion(false, false);
+ WaitableEvent completion(base::WaitableEvent::ResetPolicy::AUTOMATIC,
+ base::WaitableEvent::InitialState::NOT_SIGNALED);
ExecCookieTask(base::Bind(task, SignalEventClosure(&completion)));
ScopedAllowWaitForLegacyWebViewApi wait;
completion.Wait();
« no previous file with comments | « android_webview/browser/test/fake_window.cc ('k') | base/android/application_status_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698