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

Side by Side Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 13898011: Move SupportsUserData code into AutofillWebData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and test fix Created 7 years, 7 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
« no previous file with comments | « no previous file | components/autofill/browser/webdata/autofill_webdata_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 autocomplete_syncable_service_ = 272 autocomplete_syncable_service_ =
273 AutocompleteSyncableService::FromWebDataService(this); 273 AutocompleteSyncableService::FromWebDataService(this);
274 autofill_profile_syncable_service_ = 274 autofill_profile_syncable_service_ =
275 AutofillProfileSyncableService::FromWebDataService(this); 275 AutofillProfileSyncableService::FromWebDataService(this);
276 276
277 syncable_service_created_or_destroyed_.Signal(); 277 syncable_service_created_or_destroyed_.Signal();
278 } 278 }
279 279
280 void DestroySyncableService() { 280 void DestroySyncableService() {
281 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB)); 281 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB));
282 WebDataServiceBase::ShutdownOnDBThread(); 282 AutofillWebDataService::ShutdownOnDBThread();
283 autocomplete_syncable_service_ = NULL; 283 autocomplete_syncable_service_ = NULL;
284 autofill_profile_syncable_service_ = NULL; 284 autofill_profile_syncable_service_ = NULL;
285 syncable_service_created_or_destroyed_.Signal(); 285 syncable_service_created_or_destroyed_.Signal();
286 } 286 }
287 287
288 WebDatabase* web_database_; 288 WebDatabase* web_database_;
289 AutocompleteSyncableService* autocomplete_syncable_service_; 289 AutocompleteSyncableService* autocomplete_syncable_service_;
290 AutofillProfileSyncableService* autofill_profile_syncable_service_; 290 AutofillProfileSyncableService* autofill_profile_syncable_service_;
291 291
292 WaitableEvent syncable_service_created_or_destroyed_; 292 WaitableEvent syncable_service_created_or_destroyed_;
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 std::vector<AutofillEntry> sync_entries; 1365 std::vector<AutofillEntry> sync_entries;
1366 std::vector<AutofillProfile> sync_profiles; 1366 std::vector<AutofillProfile> sync_profiles;
1367 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles)); 1367 ASSERT_TRUE(GetAutofillEntriesFromSyncDB(&sync_entries, &sync_profiles));
1368 EXPECT_EQ(3U, sync_entries.size()); 1368 EXPECT_EQ(3U, sync_entries.size());
1369 EXPECT_EQ(0U, sync_profiles.size()); 1369 EXPECT_EQ(0U, sync_profiles.size());
1370 for (size_t i = 0; i < sync_entries.size(); i++) { 1370 for (size_t i = 0; i < sync_entries.size(); i++) {
1371 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name() 1371 DVLOG(1) << "Entry " << i << ": " << sync_entries[i].key().name()
1372 << ", " << sync_entries[i].key().value(); 1372 << ", " << sync_entries[i].key().value();
1373 } 1373 }
1374 } 1374 }
OLDNEW
« no previous file with comments | « no previous file | components/autofill/browser/webdata/autofill_webdata_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698