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

Side by Side Diff: ios/chrome/browser/ui/settings/personal_data_manager_data_changed_observer.cc

Issue 2592173002: Fix ios_chrome_unittests to crash on DCHECK failure. (Closed)
Patch Set: Rebase Created 4 years 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ios/chrome/browser/ui/settings/personal_data_manager_data_changed_obse rver.h"
6
7 #include "components/autofill/core/browser/personal_data_manager.h"
8
9 PersonalDataManagerDataChangedObserver::PersonalDataManagerDataChangedObserver(
10 autofill::PersonalDataManager* personal_data_manager)
11 : personal_data_manager_(personal_data_manager) {
12 personal_data_manager_->AddObserver(this);
13 }
14
15 PersonalDataManagerDataChangedObserver::
16 ~PersonalDataManagerDataChangedObserver() {
17 personal_data_manager_->RemoveObserver(this);
18 }
19
20 void PersonalDataManagerDataChangedObserver::Wait() {
21 run_loop_.Run();
22 }
23
24 void PersonalDataManagerDataChangedObserver::OnPersonalDataChanged() {
25 run_loop_.QuitWhenIdle();
noyau (Ping after 24h) 2016/12/22 13:17:22 Any risks of this not being called at all?
sdefresne 2016/12/22 13:28:12 If this is not called, it means that no method cau
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698