Enable password generation only if sync for passwords is enabled.
commit6dcaeae807dffd3784b45625cf746bfd882f2828
authorgcasto@chromium.org <gcasto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 4 Apr 2012 00:39:42 +0000 (4 00:39 +0000)
committergcasto@chromium.org <gcasto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 4 Apr 2012 00:39:42 +0000 (4 00:39 +0000)
treef6d6fdcef9760c4062f0caa6f5cf1b2fbf67d675
parentf6cb7cafbdde72f71c8b78179542d2392350b2ae
Enable password generation only if sync for passwords is enabled.

This is the second try at this change. The first failed because the
ProfileSyncService apparently does not always outlive the autofill_manager.
Fixed by using a WeakPtr.

BUG=114092
TEST=Ran memory try bots.

Review URL: https://chromiumcodereview.appspot.com/9950051

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130523 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/autofill/autofill_manager.cc
chrome/browser/autofill/autofill_manager.h
chrome/browser/autofill/autofill_manager_unittest.cc
chrome/common/autofill_messages.h
chrome/renderer/autofill/password_generation_manager.cc
chrome/renderer/autofill/password_generation_manager.h
chrome/renderer/autofill/password_generation_manager_browsertest.cc