| 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 "chrome/browser/sync/test/integration/autofill_helper.h" | 5 #include "chrome/browser/sync/test/integration/autofill_helper.h" |
| 6 | 6 |
| 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/autofill/autofill_type.h" | 9 #include "chrome/browser/autofill/autofill_type.h" |
| 10 #include "chrome/browser/autofill/personal_data_manager.h" | 10 #include "chrome/browser/autofill/personal_data_manager.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 public: | 33 public: |
| 34 explicit GetAllAutofillEntries(WebDataService* web_data_service) | 34 explicit GetAllAutofillEntries(WebDataService* web_data_service) |
| 35 : web_data_service_(web_data_service), | 35 : web_data_service_(web_data_service), |
| 36 done_event_(false, false) {} | 36 done_event_(false, false) {} |
| 37 | 37 |
| 38 void Init() { | 38 void Init() { |
| 39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 39 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 40 BrowserThread::PostTask( | 40 BrowserThread::PostTask( |
| 41 BrowserThread::DB, | 41 BrowserThread::DB, |
| 42 FROM_HERE, | 42 FROM_HERE, |
| 43 NewRunnableMethod(this, &GetAllAutofillEntries::Run)); | 43 base::Bind(&GetAllAutofillEntries::Run, this)); |
| 44 done_event_.Wait(); | 44 done_event_.Wait(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 const std::vector<AutofillEntry>& entries() const { | 47 const std::vector<AutofillEntry>& entries() const { |
| 48 return entries_; | 48 return entries_; |
| 49 } | 49 } |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 friend class base::RefCountedThreadSafe<GetAllAutofillEntries>; | 52 friend class base::RefCountedThreadSafe<GetAllAutofillEntries>; |
| 53 | 53 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 if (!ProfilesMatch(0, i)) { | 290 if (!ProfilesMatch(0, i)) { |
| 291 LOG(ERROR) << "Profile " << i << "does not contain the same autofill " | 291 LOG(ERROR) << "Profile " << i << "does not contain the same autofill " |
| 292 "profiles as profile 0."; | 292 "profiles as profile 0."; |
| 293 return false; | 293 return false; |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 return true; | 296 return true; |
| 297 } | 297 } |
| 298 | 298 |
| 299 } // namespace autofill_helper | 299 } // namespace autofill_helper |
| OLD | NEW |