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

Unified Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc

Issue 72613006: Eliminate AutofillWebDataService::FromBrowserContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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/ui/autofill/tab_autofill_manager_delegate.cc
diff --git a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
index e922e5be771080537c7001c56c28568ab3a2732f..f7a9e97281793edc7a22526e027484eea2af51a4 100644
--- a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
+++ b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/url_constants.h"
#include "components/autofill/content/browser/autofill_driver_impl.h"
#include "components/autofill/core/common/autofill_messages.h"
@@ -62,8 +63,10 @@ PersonalDataManager* TabAutofillManagerDelegate::GetPersonalDataManager() {
scoped_refptr<AutofillWebDataService>
TabAutofillManagerDelegate::GetDatabase() {
- return AutofillWebDataService::FromBrowserContext(
- web_contents_->GetBrowserContext());
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents_->GetBrowserContext());
+ return WebDataServiceFactory::GetAutofillWebDataForProfile(
+ profile, Profile::EXPLICIT_ACCESS);
}
PrefService* TabAutofillManagerDelegate::GetPrefs() {
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc ('k') | chrome/browser/webdata/web_data_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698