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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // Don't want Keychain coming up on Mac. | 119 // Don't want Keychain coming up on Mac. |
120 test::DisableSystemServices(browser()->profile()->GetPrefs()); | 120 test::DisableSystemServices(browser()->profile()->GetPrefs()); |
121 } | 121 } |
122 | 122 |
123 virtual void CleanUpOnMainThread() OVERRIDE { | 123 virtual void CleanUpOnMainThread() OVERRIDE { |
124 // Make sure to close any showing popups prior to tearing down the UI. | 124 // Make sure to close any showing popups prior to tearing down the UI. |
125 content::WebContents* web_contents = | 125 content::WebContents* web_contents = |
126 browser()->tab_strip_model()->GetActiveWebContents(); | 126 browser()->tab_strip_model()->GetActiveWebContents(); |
127 AutofillManager* autofill_manager = ContentAutofillDriver::FromWebContents( | 127 AutofillManager* autofill_manager = ContentAutofillDriver::FromWebContents( |
128 web_contents)->autofill_manager(); | 128 web_contents)->autofill_manager(); |
129 autofill_manager->delegate()->HideAutofillPopup(); | 129 autofill_manager->client()->HideAutofillPopup(); |
130 } | 130 } |
131 | 131 |
132 PersonalDataManager* personal_data_manager() { | 132 PersonalDataManager* personal_data_manager() { |
133 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); | 133 return PersonalDataManagerFactory::GetForProfile(browser()->profile()); |
134 } | 134 } |
135 | 135 |
136 void SetProfiles(std::vector<AutofillProfile>* profiles) { | 136 void SetProfiles(std::vector<AutofillProfile>* profiles) { |
137 WindowedPersonalDataManagerObserver observer(browser()); | 137 WindowedPersonalDataManagerObserver observer(browser()); |
138 personal_data_manager()->SetProfiles(profiles); | 138 personal_data_manager()->SetProfiles(profiles); |
139 observer.Wait(); | 139 observer.Wait(); |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 IN_PROC_BROWSER_TEST_F(AutofillTest, | 725 IN_PROC_BROWSER_TEST_F(AutofillTest, |
726 DISABLED_MergeAggregatedDuplicatedProfiles) { | 726 DISABLED_MergeAggregatedDuplicatedProfiles) { |
727 int num_of_profiles = | 727 int num_of_profiles = |
728 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); | 728 AggregateProfilesIntoAutofillPrefs("dataset_duplicated_profiles.txt"); |
729 | 729 |
730 ASSERT_GT(num_of_profiles, | 730 ASSERT_GT(num_of_profiles, |
731 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 731 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
732 } | 732 } |
733 | 733 |
734 } // namespace autofill | 734 } // namespace autofill |
OLD | NEW |