| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/stringprintf.h" | 5 #include "base/stringprintf.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/browser/autofill/autofill_common_test.h" | 7 #include "chrome/browser/autofill/autofill_common_test.h" |
| 8 #include "chrome/browser/autofill/autofill_profile.h" | 8 #include "chrome/browser/autofill/autofill_profile.h" |
| 9 #include "chrome/browser/sync/profile_sync_service_harness.h" | 9 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 10 #include "chrome/browser/sync/test/integration/autofill_helper.h" | 10 #include "chrome/browser/sync/test/integration/autofill_helper.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 for (std::set<AutofillEntry>::const_iterator it = keys.begin(); | 120 for (std::set<AutofillEntry>::const_iterator it = keys.begin(); |
| 121 it != keys.end(); ++it) { | 121 it != keys.end(); ++it) { |
| 122 RemoveKey(profile, it->key()); | 122 RemoveKey(profile, it->key()); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 const AutofillProfile AutofillSyncPerfTest::NextAutofillProfile() { | 126 const AutofillProfile AutofillSyncPerfTest::NextAutofillProfile() { |
| 127 AutofillProfile profile; | 127 AutofillProfile profile; |
| 128 autofill_test::SetProfileInfoWithGuid(&profile, NextGUID().c_str(), | 128 autofill_test::SetProfileInfoWithGuid(&profile, NextGUID().c_str(), |
| 129 NextName().c_str(), "", "", "", "", "", | 129 NextName().c_str(), "", "", "", "", "", |
| 130 "", "", "", "", "", "", ""); | 130 "", "", "", "", "", ""); |
| 131 return profile; | 131 return profile; |
| 132 } | 132 } |
| 133 | 133 |
| 134 const AutofillKey AutofillSyncPerfTest::NextAutofillKey() { | 134 const AutofillKey AutofillSyncPerfTest::NextAutofillKey() { |
| 135 return AutofillKey(NextName().c_str(), NextName().c_str()); | 135 return AutofillKey(NextName().c_str(), NextName().c_str()); |
| 136 } | 136 } |
| 137 | 137 |
| 138 const std::string AutofillSyncPerfTest::NextGUID() { | 138 const std::string AutofillSyncPerfTest::NextGUID() { |
| 139 return IntToGUID(guid_number_++); | 139 return IntToGUID(guid_number_++); |
| 140 } | 140 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 base::TimeDelta dt = | 189 base::TimeDelta dt = |
| 190 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); | 190 SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); |
| 191 ASSERT_EQ(kNumKeys, GetKeyCount(1)); | 191 ASSERT_EQ(kNumKeys, GetKeyCount(1)); |
| 192 SyncTimingHelper::PrintResult("autofill", "add_autofill_keys", dt); | 192 SyncTimingHelper::PrintResult("autofill", "add_autofill_keys", dt); |
| 193 | 193 |
| 194 RemoveKeys(0); | 194 RemoveKeys(0); |
| 195 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); | 195 dt = SyncTimingHelper::TimeMutualSyncCycle(GetClient(0), GetClient(1)); |
| 196 ASSERT_EQ(0, GetKeyCount(1)); | 196 ASSERT_EQ(0, GetKeyCount(1)); |
| 197 SyncTimingHelper::PrintResult("autofill", "delete_autofill_keys", dt); | 197 SyncTimingHelper::PrintResult("autofill", "delete_autofill_keys", dt); |
| 198 } | 198 } |
| OLD | NEW |