| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 using testing::Not; | 93 using testing::Not; |
| 94 using testing::SetArgumentPointee; | 94 using testing::SetArgumentPointee; |
| 95 using testing::Return; | 95 using testing::Return; |
| 96 | 96 |
| 97 namespace { | 97 namespace { |
| 98 | 98 |
| 99 void RegisterAutofillPrefs(user_prefs::PrefRegistrySyncable* registry) { | 99 void RegisterAutofillPrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 100 registry->RegisterBooleanPref(autofill::prefs::kAutofillEnabled, true); | 100 registry->RegisterBooleanPref(autofill::prefs::kAutofillEnabled, true); |
| 101 registry->RegisterBooleanPref(autofill::prefs::kAutofillWalletImportEnabled, | 101 registry->RegisterBooleanPref(autofill::prefs::kAutofillWalletImportEnabled, |
| 102 true); | 102 true); |
| 103 registry->RegisterIntegerPref(autofill::prefs::kAutofillLastVersionDeduped, |
| 104 true); |
| 103 } | 105 } |
| 104 | 106 |
| 105 void RunAndSignal(const base::Closure& cb, WaitableEvent* event) { | 107 void RunAndSignal(const base::Closure& cb, WaitableEvent* event) { |
| 106 cb.Run(); | 108 cb.Run(); |
| 107 event->Signal(); | 109 event->Signal(); |
| 108 } | 110 } |
| 109 | 111 |
| 110 AutofillEntry MakeAutofillEntry(const char* name, | 112 AutofillEntry MakeAutofillEntry(const char* name, |
| 111 const char* value, | 113 const char* value, |
| 112 int time_shift0, | 114 int time_shift0, |
| (...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 std::vector<AutofillEntry> sync_entries; | 1463 std::vector<AutofillEntry> sync_entries; |
| 1462 std::vector<AutofillProfile> sync_profiles; | 1464 std::vector<AutofillProfile> sync_profiles; |
| 1463 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); | 1465 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); |
| 1464 EXPECT_EQ(3U, sync_entries.size()); | 1466 EXPECT_EQ(3U, sync_entries.size()); |
| 1465 EXPECT_EQ(0U, sync_profiles.size()); | 1467 EXPECT_EQ(0U, sync_profiles.size()); |
| 1466 for (size_t i = 0; i < sync_entries.size(); i++) { | 1468 for (size_t i = 0; i < sync_entries.size(); i++) { |
| 1467 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() | 1469 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() |
| 1468 << ", " << sync_entries[i].key().value(); | 1470 << ", " << sync_entries[i].key().value(); |
| 1469 } | 1471 } |
| 1470 } | 1472 } |
| OLD | NEW |