| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/autofill/core/browser/personal_data_manager.h" | 5 #include "components/autofill/core/browser/personal_data_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 field_trial_list_.reset(); | 143 field_trial_list_.reset(); |
| 144 | 144 |
| 145 // There are no features enabled by default. | 145 // There are no features enabled by default. |
| 146 base::FeatureList::ClearInstanceForTesting(); | 146 base::FeatureList::ClearInstanceForTesting(); |
| 147 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); | 147 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); |
| 148 base::FeatureList::SetInstance(std::move(feature_list)); | 148 base::FeatureList::SetInstance(std::move(feature_list)); |
| 149 | 149 |
| 150 // Reset the deduping pref to its default value. | 150 // Reset the deduping pref to its default value. |
| 151 personal_data_->pref_service_->SetInteger( | 151 personal_data_->pref_service_->SetInteger( |
| 152 prefs::kAutofillLastVersionDeduped, 0); | 152 prefs::kAutofillLastVersionDeduped, 0); |
| 153 personal_data_->pref_service_->SetBoolean( |
| 154 prefs::kAutofillProfileUseDatesFixed, false); |
| 153 } | 155 } |
| 154 | 156 |
| 155 void TearDown() override { | 157 void TearDown() override { |
| 156 // Order of destruction is important as AutofillManager relies on | 158 // Order of destruction is important as AutofillManager relies on |
| 157 // PersonalDataManager to be around when it gets destroyed. | 159 // PersonalDataManager to be around when it gets destroyed. |
| 158 signin_manager_->Shutdown(); | 160 signin_manager_->Shutdown(); |
| 159 signin_manager_.reset(); | 161 signin_manager_.reset(); |
| 160 | 162 |
| 161 account_tracker_->Shutdown(); | 163 account_tracker_->Shutdown(); |
| 162 account_tracker_.reset(); | 164 account_tracker_.reset(); |
| (...skipping 5053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5216 EnableAutofillProfileCleanup(); | 5218 EnableAutofillProfileCleanup(); |
| 5217 | 5219 |
| 5218 // The deduping routine should not be run. | 5220 // The deduping routine should not be run. |
| 5219 EXPECT_FALSE(personal_data_->ApplyDedupingRoutine()); | 5221 EXPECT_FALSE(personal_data_->ApplyDedupingRoutine()); |
| 5220 | 5222 |
| 5221 // The two duplicate profiles should still be present. | 5223 // The two duplicate profiles should still be present. |
| 5222 EXPECT_EQ(2U, personal_data_->GetProfiles().size()); | 5224 EXPECT_EQ(2U, personal_data_->GetProfiles().size()); |
| 5223 } | 5225 } |
| 5224 | 5226 |
| 5225 } // namespace autofill | 5227 } // namespace autofill |
| OLD | NEW |