| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 has_run_message_loop_ = true; | 90 has_run_message_loop_ = true; |
| 91 content::RunMessageLoop(); | 91 content::RunMessageLoop(); |
| 92 } | 92 } |
| 93 PersonalDataManagerFactory::GetForProfile(browser_->profile())-> | 93 PersonalDataManagerFactory::GetForProfile(browser_->profile())-> |
| 94 RemoveObserver(this); | 94 RemoveObserver(this); |
| 95 } | 95 } |
| 96 | 96 |
| 97 // PersonalDataManagerObserver: | 97 // PersonalDataManagerObserver: |
| 98 void OnPersonalDataChanged() override { | 98 void OnPersonalDataChanged() override { |
| 99 if (has_run_message_loop_) { | 99 if (has_run_message_loop_) { |
| 100 base::MessageLoopForUI::current()->Quit(); | 100 base::MessageLoopForUI::current()->QuitWhenIdle(); |
| 101 has_run_message_loop_ = false; | 101 has_run_message_loop_ = false; |
| 102 } | 102 } |
| 103 alerted_ = true; | 103 alerted_ = true; |
| 104 } | 104 } |
| 105 | 105 |
| 106 void OnInsufficientFormData() override { OnPersonalDataChanged(); } | 106 void OnInsufficientFormData() override { OnPersonalDataChanged(); } |
| 107 | 107 |
| 108 // infobars::InfoBarManager::Observer: | 108 // infobars::InfoBarManager::Observer: |
| 109 void OnInfoBarAdded(infobars::InfoBar* infobar) override { | 109 void OnInfoBarAdded(infobars::InfoBar* infobar) override { |
| 110 ConfirmInfoBarDelegate* infobar_delegate = | 110 ConfirmInfoBarDelegate* infobar_delegate = |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 943 IN_PROC_BROWSER_TEST_F(AutofillTest, | 943 IN_PROC_BROWSER_TEST_F(AutofillTest, |
| 944 DISABLED_MergeAggregatedDuplicatedProfiles) { | 944 DISABLED_MergeAggregatedDuplicatedProfiles) { |
| 945 int num_of_profiles = | 945 int num_of_profiles = |
| 946 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); | 946 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); |
| 947 | 947 |
| 948 ASSERT_GT(num_of_profiles, | 948 ASSERT_GT(num_of_profiles, |
| 949 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 949 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
| 950 } | 950 } |
| 951 | 951 |
| 952 } // namespace autofill | 952 } // namespace autofill |
| OLD | NEW |