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

Side by Side Diff: chrome/browser/sync/test/integration/autofill_helper.cc

Issue 2830603002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/sync (Closed)
Patch Set: Created 3 years, 8 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/browser/sync/test/integration/autofill_helper.h" 5 #include "chrome/browser/sync/test/integration/autofill_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 base::WaitableEvent* done_event) { 63 base::WaitableEvent* done_event) {
64 if (!task.is_null()) { 64 if (!task.is_null()) {
65 task.Run(); 65 task.Run();
66 } 66 }
67 done_event->Signal(); 67 done_event->Signal();
68 } 68 }
69 69
70 void RunOnDBThreadAndBlock(base::Closure task) { 70 void RunOnDBThreadAndBlock(base::Closure task) {
71 WaitableEvent done_event(base::WaitableEvent::ResetPolicy::AUTOMATIC, 71 WaitableEvent done_event(base::WaitableEvent::ResetPolicy::AUTOMATIC,
72 base::WaitableEvent::InitialState::NOT_SIGNALED); 72 base::WaitableEvent::InitialState::NOT_SIGNALED);
73 BrowserThread::PostTask(BrowserThread::DB, 73 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
74 FROM_HERE, 74 BindOnce(&RunOnDBThreadAndSignal, task, &done_event));
75 Bind(&RunOnDBThreadAndSignal, task, &done_event));
76 done_event.Wait(); 75 done_event.Wait();
77 } 76 }
78 77
79 void RemoveKeyDontBlockForSync(int profile, const AutofillKey& key) { 78 void RemoveKeyDontBlockForSync(int profile, const AutofillKey& key) {
80 WaitableEvent done_event(base::WaitableEvent::ResetPolicy::AUTOMATIC, 79 WaitableEvent done_event(base::WaitableEvent::ResetPolicy::AUTOMATIC,
81 base::WaitableEvent::InitialState::NOT_SIGNALED); 80 base::WaitableEvent::InitialState::NOT_SIGNALED);
82 81
83 MockWebDataServiceObserver mock_observer; 82 MockWebDataServiceObserver mock_observer;
84 EXPECT_CALL(mock_observer, AutofillEntriesChanged(_)) 83 EXPECT_CALL(mock_observer, AutofillEntriesChanged(_))
85 .WillOnce(SignalEvent(&done_event)); 84 .WillOnce(SignalEvent(&done_event));
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 autofill_profiles_b); 412 autofill_profiles_b);
414 } 413 }
415 414
416 std::string AutofillProfileChecker::GetDebugMessage() const { 415 std::string AutofillProfileChecker::GetDebugMessage() const {
417 return "Waiting for matching autofill profiles"; 416 return "Waiting for matching autofill profiles";
418 } 417 }
419 418
420 void AutofillProfileChecker::OnPersonalDataChanged() { 419 void AutofillProfileChecker::OnPersonalDataChanged() {
421 CheckExitCondition(); 420 CheckExitCondition();
422 } 421 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698