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

Unified Diff: chrome/browser/ui/tab_contents/tab_contents.cc

Issue 10987100: Switch AutofillManager to be UserData on WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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/ui/tab_contents/tab_contents.cc
diff --git a/chrome/browser/ui/tab_contents/tab_contents.cc b/chrome/browser/ui/tab_contents/tab_contents.cc
index e78bdf881315400b176a673f7936766f313bd5ed..4bd9c53819ff8505399b1a8ec3dc5bc9f4201b85 100644
--- a/chrome/browser/ui/tab_contents/tab_contents.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents.cc
@@ -116,14 +116,15 @@ TabContents::TabContents(WebContents* contents)
AlternateErrorPageTabObserver::CreateForWebContents(contents);
AutocompleteHistoryManager::CreateForWebContents(contents);
TabAutofillManagerDelegate::CreateForWebContents(contents);
- autofill_manager_ =
- new AutofillManager(TabAutofillManagerDelegate::FromWebContents(contents),
- this);
+ AutofillManager::CreateForWebContentsAndDelegate(
+ contents,
+ TabAutofillManagerDelegate::FromWebContents(contents));
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kExternalAutofillPopup)) {
- autofill_external_delegate_.reset(
- AutofillExternalDelegate::Create(this, autofill_manager_.get()));
- autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get());
+ autofill_external_delegate_.reset(AutofillExternalDelegate::Create(
+ this, AutofillManager::FromWebContents(contents)));
+ AutofillManager::FromWebContents(contents)->SetExternalDelegate(
+ autofill_external_delegate_.get());
AutocompleteHistoryManager::FromWebContents(contents)->SetExternalDelegate(
autofill_external_delegate_.get());
}
« chrome/browser/autofill/autofill_manager.cc ('K') | « chrome/browser/ui/tab_contents/tab_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698