Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: chrome/browser/sync/test/integration/autofill_helper.cc

Issue 12543034: Move creation of the various WebDatabaseTable types out of WebDatabase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows release builds (COMDAT folding combined static functions being used for keys. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/autofill_helper.h" 5 #include "chrome/browser/sync/test/integration/autofill_helper.h"
6 6
7 #include "chrome/browser/autofill/personal_data_manager_factory.h" 7 #include "chrome/browser/autofill/personal_data_manager_factory.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sync/profile_sync_service.h" 9 #include "chrome/browser/sync/profile_sync_service.h"
10 #include "chrome/browser/sync/profile_sync_test_util.h" 10 #include "chrome/browser/sync/profile_sync_test_util.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 WaitableEvent done_event(false, false); 79 WaitableEvent done_event(false, false);
80 BrowserThread::PostTask(BrowserThread::DB, 80 BrowserThread::PostTask(BrowserThread::DB,
81 FROM_HERE, 81 FROM_HERE,
82 Bind(&RunOnDBThreadAndSignal, task, &done_event)); 82 Bind(&RunOnDBThreadAndSignal, task, &done_event));
83 done_event.Wait(); 83 done_event.Wait();
84 } 84 }
85 85
86 void GetAllAutofillEntriesOnDBThread(WebDataService* wds, 86 void GetAllAutofillEntriesOnDBThread(WebDataService* wds,
87 std::vector<AutofillEntry>* entries) { 87 std::vector<AutofillEntry>* entries) {
88 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 88 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
89 wds->GetDatabase()->GetAutofillTable()->GetAllAutofillEntries(entries); 89 AutofillTable::FromWebDatabase(
90 wds->GetDatabase())->GetAllAutofillEntries(entries);
90 } 91 }
91 92
92 std::vector<AutofillEntry> GetAllAutofillEntries(WebDataService* wds) { 93 std::vector<AutofillEntry> GetAllAutofillEntries(WebDataService* wds) {
93 std::vector<AutofillEntry> entries; 94 std::vector<AutofillEntry> entries;
94 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 95 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
95 RunOnDBThreadAndBlock(Bind(&GetAllAutofillEntriesOnDBThread, 96 RunOnDBThreadAndBlock(Bind(&GetAllAutofillEntriesOnDBThread,
96 Unretained(wds), 97 Unretained(wds),
97 &entries)); 98 &entries));
98 return entries; 99 return entries;
99 } 100 }
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 if (!ProfilesMatch(0, i)) { 326 if (!ProfilesMatch(0, i)) {
326 LOG(ERROR) << "Profile " << i << "does not contain the same autofill " 327 LOG(ERROR) << "Profile " << i << "does not contain the same autofill "
327 "profiles as profile 0."; 328 "profiles as profile 0.";
328 return false; 329 return false;
329 } 330 }
330 } 331 }
331 return true; 332 return true;
332 } 333 }
333 334
334 } // namespace autofill_helper 335 } // namespace autofill_helper
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_autofill_unittest.cc ('k') | chrome/browser/webdata/autocomplete_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698