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

Unified Diff: android_webview/native/aw_autofill_manager_delegate.cc

Issue 72613006: Eliminate AutofillWebDataService::FromBrowserContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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: android_webview/native/aw_autofill_manager_delegate.cc
diff --git a/android_webview/native/aw_autofill_manager_delegate.cc b/android_webview/native/aw_autofill_manager_delegate.cc
index 06eec05314185d14ddc13c74a71a802d845697bb..5dad2accfc54566507c4a5618b276a61259f7666 100644
--- a/android_webview/native/aw_autofill_manager_delegate.cc
+++ b/android_webview/native/aw_autofill_manager_delegate.cc
@@ -6,6 +6,7 @@
#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/browser/aw_content_browser_client.h"
+#include "android_webview/browser/aw_form_database_service.h"
#include "android_webview/browser/aw_pref_store.h"
#include "android_webview/native/aw_contents.h"
#include "base/android/jni_android.h"
@@ -73,8 +74,11 @@ AwAutofillManagerDelegate::GetPersonalDataManager() {
scoped_refptr<autofill::AutofillWebDataService>
AwAutofillManagerDelegate::GetDatabase() {
- return autofill::AutofillWebDataService::FromBrowserContext(
- web_contents_->GetBrowserContext());
+ android_webview::AwFormDatabaseService* service =
+ static_cast<android_webview::AwBrowserContext*>(
+ web_contents_->GetBrowserContext())->GetFormDatabaseService();
+ DCHECK(service);
Ilya Sherman 2013/11/14 23:54:33 nit: This is redundant with just making a method c
blundell 2013/11/19 14:05:37 Done.
+ return service->get_autofill_webdata_service();
}
void AwAutofillManagerDelegate::ShowAutofillPopup(

Powered by Google App Engine
This is Rietveld 408576698