| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 using testing::Not; | 94 using testing::Not; |
| 95 using testing::SetArgumentPointee; | 95 using testing::SetArgumentPointee; |
| 96 using testing::Return; | 96 using testing::Return; |
| 97 | 97 |
| 98 namespace { | 98 namespace { |
| 99 | 99 |
| 100 void RegisterAutofillPrefs(user_prefs::PrefRegistrySyncable* registry) { | 100 void RegisterAutofillPrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 101 registry->RegisterBooleanPref(autofill::prefs::kAutofillEnabled, true); | 101 registry->RegisterBooleanPref(autofill::prefs::kAutofillEnabled, true); |
| 102 registry->RegisterBooleanPref(autofill::prefs::kAutofillWalletImportEnabled, | 102 registry->RegisterBooleanPref(autofill::prefs::kAutofillWalletImportEnabled, |
| 103 true); | 103 true); |
| 104 registry->RegisterBooleanPref(autofill::prefs::kAutofillProfileUseDatesFixed, |
| 105 true); |
| 104 registry->RegisterIntegerPref(autofill::prefs::kAutofillLastVersionDeduped, | 106 registry->RegisterIntegerPref(autofill::prefs::kAutofillLastVersionDeduped, |
| 105 atoi(version_info::GetVersionNumber().c_str())); | 107 atoi(version_info::GetVersionNumber().c_str())); |
| 106 } | 108 } |
| 107 | 109 |
| 108 void RunAndSignal(const base::Closure& cb, WaitableEvent* event) { | 110 void RunAndSignal(const base::Closure& cb, WaitableEvent* event) { |
| 109 cb.Run(); | 111 cb.Run(); |
| 110 event->Signal(); | 112 event->Signal(); |
| 111 } | 113 } |
| 112 | 114 |
| 113 AutofillEntry MakeAutofillEntry(const char* name, | 115 AutofillEntry MakeAutofillEntry(const char* name, |
| (...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 std::vector<AutofillEntry> sync_entries; | 1480 std::vector<AutofillEntry> sync_entries; |
| 1479 std::vector<AutofillProfile> sync_profiles; | 1481 std::vector<AutofillProfile> sync_profiles; |
| 1480 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1482 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
| 1481 EXPECT_EQ(3U, sync_entries.size()); | 1483 EXPECT_EQ(3U, sync_entries.size()); |
| 1482 EXPECT_EQ(0U, sync_profiles.size()); | 1484 EXPECT_EQ(0U, sync_profiles.size()); |
| 1483 for (size_t i = 0; i < sync_entries.size(); i++) { | 1485 for (size_t i = 0; i < sync_entries.size(); i++) { |
| 1484 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1486 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
| 1485 << ", " << sync_entries[i].key().value(); | 1487 << ", " << sync_entries[i].key().value(); |
| 1486 } | 1488 } |
| 1487 } | 1489 } |
| OLD | NEW |