summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/autofill_manager.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 21:26:42 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 21:26:42 +0000
commit96e284571293e7706dc95acf919f2be8ac621127 (patch)
treeafdf4ceb6951a0277f9a5732045e72cdff8c2d5d /chrome/browser/autofill/autofill_manager.cc
parent9d8fc9b143c891d4aba21ac2e4724db158f47e05 (diff)
downloadchromium_src-96e284571293e7706dc95acf919f2be8ac621127.zip
chromium_src-96e284571293e7706dc95acf919f2be8ac621127.tar.gz
chromium_src-96e284571293e7706dc95acf919f2be8ac621127.tar.bz2
Don't use the TabContents in the AutoFillInfoBarDelegateTest. Fixes a few leaks.
BUG=38481 TEST=none Review URL: http://codereview.chromium.org/1109005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41989 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autofill/autofill_manager.cc')
-rw-r--r--chrome/browser/autofill/autofill_manager.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 0e57d5e..718b9a1 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -32,7 +32,9 @@ AutoFillManager::AutoFillManager(TabContents* tab_contents)
}
AutoFillManager::~AutoFillManager() {
- personal_data_->RemoveObserver(this);
+ // This is NULL in the MockAutoFillManager.
+ if (personal_data_)
+ personal_data_->RemoveObserver(this);
}
// static
@@ -324,3 +326,8 @@ bool AutoFillManager::IsAutoFillEnabled() {
return prefs->GetBoolean(prefs::kAutoFillEnabled);
}
+
+AutoFillManager::AutoFillManager()
+ : tab_contents_(NULL),
+ personal_data_(NULL) {
+}