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

Unified Diff: chrome/browser/sync/test/integration/autofill_helper.cc

Issue 10185008: Taking over issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/test/integration/autofill_helper.cc
===================================================================
--- chrome/browser/sync/test/integration/autofill_helper.cc (revision 136877)
+++ chrome/browser/sync/test/integration/autofill_helper.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/webdata/autofill_entry.h"
#include "chrome/browser/webdata/autofill_table.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/browser/webdata/web_database.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/test/base/thread_observer_helper.h"
@@ -60,7 +61,8 @@
EXPECT_CALL(*observer_helper->observer(), Observe(_, _, _)).
WillOnce(SignalEvent(&done_event));
- WebDataService* wds = autofill_helper::GetWebDataService(profile);
+ scoped_refptr<WebDataService> wds =
+ autofill_helper::GetWebDataService(profile);
wds->RemoveFormValueForElementName(key.name(), key.value());
done_event.Wait();
}
@@ -146,8 +148,9 @@
return profile;
}
-WebDataService* GetWebDataService(int index) {
- return test()->GetProfile(index)->GetWebDataService(Profile::EXPLICIT_ACCESS);
+scoped_refptr<WebDataService> GetWebDataService(int index) {
+ return WebDataServiceFactory::GetForProfile(
+ test()->GetProfile(index), Profile::EXPLICIT_ACCESS);
}
PersonalDataManager* GetPersonalDataManager(int index) {
@@ -172,7 +175,7 @@
EXPECT_CALL(*observer_helper->observer(), Observe(_, _, _)).
WillOnce(SignalEvent(&done_event));
- WebDataService* wds = GetWebDataService(profile);
+ scoped_refptr<WebDataService> wds = GetWebDataService(profile);
wds->AddFormFields(form_fields);
done_event.Wait();
BlockForPendingDBThreadTasks();
@@ -193,7 +196,7 @@
}
std::set<AutofillEntry> GetAllKeys(int profile) {
- WebDataService* wds = GetWebDataService(profile);
+ scoped_refptr<WebDataService> wds = GetWebDataService(profile);
std::vector<AutofillEntry> all_entries = GetAllAutofillEntries(wds);
std::set<AutofillEntry> all_keys;
for (std::vector<AutofillEntry>::const_iterator it = all_entries.begin();

Powered by Google App Engine
This is Rietveld 408576698