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

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: fix external delegate Created 8 years, 2 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
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c9f5c280df3b6f1cb33bb259850535cbbd356714..372f8fa2c141a744f139b174b0423a4439f5def9 100644
--- a/chrome/browser/ui/tab_contents/tab_contents.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents.cc
@@ -115,14 +115,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());
}
« no previous file with comments | « 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