diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 19:35:05 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 19:35:05 +0000 |
commit | 7271ae675d6ae3d98db54134267a41d1f683ea92 (patch) | |
tree | d47437b4539f4c455ab0a23214e41fcf2a7a9efe /chrome/browser/browsing_data_remover.cc | |
parent | d7da65dcddcfcf6c63cecdbedccdd6fd1cbf07d2 (diff) | |
download | chromium_src-7271ae675d6ae3d98db54134267a41d1f683ea92.zip chromium_src-7271ae675d6ae3d98db54134267a41d1f683ea92.tar.gz chromium_src-7271ae675d6ae3d98db54134267a41d1f683ea92.tar.bz2 |
Don't crash on 'clear form data' in otr window
An OTR profile does not have a PersonalDataManager, so check for its existence
before refreshing it after clearing autofill form data from browsing history.
BUG=62533
TEST=see bug
Review URL: http://codereview.chromium.org/4771006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.cc')
-rw-r--r-- | chrome/browser/browsing_data_remover.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc index ced833d..b532f30 100644 --- a/chrome/browser/browsing_data_remover.cc +++ b/chrome/browser/browsing_data_remover.cc @@ -228,7 +228,10 @@ void BrowsingDataRemover::Remove(int remove_mask) { delete_end_); web_data_service->RemoveAutoFillProfilesAndCreditCardsModifiedBetween( delete_begin_, delete_end_); - profile_->GetPersonalDataManager()->Refresh(); + PersonalDataManager* data_manager = profile_->GetPersonalDataManager(); + if (data_manager) { + data_manager->Refresh(); + } } } |