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 "chrome/browser/sync/test/integration/passwords_helper.h" | 5 #include "chrome/browser/sync/test/integration/passwords_helper.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/password_manager/password_form_data.h" | 12 #include "chrome/browser/password_manager/password_form_data.h" |
13 #include "chrome/browser/password_manager/password_store.h" | 13 #include "chrome/browser/password_manager/password_store.h" |
14 #include "chrome/browser/password_manager/password_store_consumer.h" | 14 #include "chrome/browser/password_manager/password_store_consumer.h" |
15 #include "chrome/browser/password_manager/password_store_factory.h" | 15 #include "chrome/browser/password_manager/password_store_factory.h" |
16 #include "chrome/browser/sync/profile_sync_service.h" | 16 #include "chrome/browser/sync/profile_sync_service.h" |
17 #include "chrome/browser/sync/profile_sync_service_factory.h" | 17 #include "chrome/browser/sync/profile_sync_service_factory.h" |
18 #include "chrome/browser/sync/profile_sync_service_harness.h" | 18 #include "chrome/browser/sync/profile_sync_service_harness.h" |
19 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 19 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
20 #include "chrome/test/base/ui_test_utils.h" | 20 #include "chrome/test/base/ui_test_utils.h" |
21 #include "content/public/browser/browser_thread.h" | |
22 | 21 |
23 using content::PasswordForm; | 22 using content::PasswordForm; |
24 using sync_datatype_helper::test; | 23 using sync_datatype_helper::test; |
25 | 24 |
26 const std::string kFakeSignonRealm = "http://fake-signon-realm.google.com/"; | 25 const std::string kFakeSignonRealm = "http://fake-signon-realm.google.com/"; |
27 const char* kIndexedFakeOrigin = "http://fake-signon-realm.google.com/%d"; | 26 const char* kIndexedFakeOrigin = "http://fake-signon-realm.google.com/%d"; |
28 | 27 |
29 namespace { | 28 namespace { |
30 | 29 |
31 // We use a WaitableEvent to wait when logins are added, removed, or updated | 30 // We use a WaitableEvent to wait when logins are added, removed, or updated |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 PasswordForm form; | 216 PasswordForm form; |
218 form.signon_realm = kFakeSignonRealm; | 217 form.signon_realm = kFakeSignonRealm; |
219 form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index)); | 218 form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index)); |
220 form.username_value = ASCIIToUTF16(base::StringPrintf("username%d", index)); | 219 form.username_value = ASCIIToUTF16(base::StringPrintf("username%d", index)); |
221 form.password_value = ASCIIToUTF16(base::StringPrintf("password%d", index)); | 220 form.password_value = ASCIIToUTF16(base::StringPrintf("password%d", index)); |
222 form.date_created = base::Time::Now(); | 221 form.date_created = base::Time::Now(); |
223 return form; | 222 return form; |
224 } | 223 } |
225 | 224 |
226 } // namespace passwords_helper | 225 } // namespace passwords_helper |
OLD | NEW |