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

Unified Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 16154031: Un-refcount AutofillWebData and TokenWebData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/profile_sync_service_autofill_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index f32b7e2c0692b1baaa9d1d651e516a06e5616645..c909fb078c6d6015027abc9e5b279319a2143256 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -226,6 +226,8 @@ class WebDataServiceFake : public AutofillWebDataService {
syncable_service_created_or_destroyed_(false, false) {
}
+ virtual ~WebDataServiceFake() {}
+
void SetDatabase(WebDatabase* web_database) {
web_database_ = web_database;
}
@@ -290,8 +292,6 @@ class WebDataServiceFake : public AutofillWebDataService {
}
private:
- virtual ~WebDataServiceFake() {}
-
void CreateSyncableService(const base::Closure& on_changed_callback) {
ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB));
// These services are deleted in DestroySyncableService().
@@ -511,7 +511,7 @@ class ProfileSyncServiceAutofillTest
WebDataServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile_.get(), BuildMockWebDataServiceWrapper));
web_data_service_ =
- static_cast<WebDataServiceFake*>(wrapper->GetAutofillWebData().get());
+ static_cast<WebDataServiceFake*>(wrapper->GetAutofillWebData());
web_data_service_->SetDatabase(web_database_.get());
MockPersonalDataManagerService* personal_data_manager_service =
@@ -577,7 +577,7 @@ class ProfileSyncServiceAutofillTest
sync_service_);
factory->SetExpectation(components,
sync_service_,
- web_data_service_.get(),
+ web_data_service_,
data_type_controller);
EXPECT_CALL(*components, CreateDataTypeManager(_, _, _, _, _, _)).
@@ -757,7 +757,7 @@ class ProfileSyncServiceAutofillTest
scoped_ptr<ProfileMock> profile_;
AutofillTableMock autofill_table_;
scoped_ptr<WebDatabaseFake> web_database_;
- scoped_refptr<WebDataServiceFake> web_data_service_;
+ WebDataServiceFake* web_data_service_;
MockPersonalDataManager* personal_data_manager_;
syncer::DataTypeAssociationStats association_stats_;
base::WeakPtrFactory<DataTypeDebugInfoListener> debug_ptr_factory_;
@@ -935,7 +935,7 @@ bool IncludesField(const AutofillProfile& profile1,
return true;
}
-};
+}; // namespace
// TODO(skrul): Test abort startup.
// TODO(skrul): Test processing of cloud changes.
« no previous file with comments | « chrome/browser/sync/profile_sync_components_factory_impl.cc ('k') | chrome/browser/sync/test/integration/autofill_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698