Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 } | |
| OLD | NEW |