summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_remover.cc
diff options
context:
space:
mode:
authoramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 16:16:26 +0000
committeramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 16:16:26 +0000
commitdbba57ffa3c2f14bf5a3b16a47307188539df0b6 (patch)
tree391301ddd14104978d0d8553bbaa500f72afdf15 /chrome/browser/browsing_data_remover.cc
parent43b8b5511efeff341d3855ef8c08056fcd30a621 (diff)
downloadchromium_src-dbba57ffa3c2f14bf5a3b16a47307188539df0b6.zip
chromium_src-dbba57ffa3c2f14bf5a3b16a47307188539df0b6.tar.gz
chromium_src-dbba57ffa3c2f14bf5a3b16a47307188539df0b6.tar.bz2
Fix a crash during history deletion.
This happens mainly in chrome frame where password manager or the web data service could be invalid due to failed sqllite initialization. The failure is due to chrome.exe running in low integrity mode while deleting browser history. This a temporary fix to avoid crash the right fix is to run chrome.exe at medium integrity and that involves some investigation. Now why chrome.exe runs in the low integrity mode is a long story. Chrome Frame implements IDeleteBrowsingHistory to participate in history/user data deletion. IE8 tries to be smart and invokes IDeleteBrowsingHistory methods in by launching a separate process, rundll32.exe. However, when npchrome_frame.dll's implementation is invoked the container rundll32.exe is in low integrity. IE's elevation policy does not work for us to elevate chrome_launcher.exe to medium in this case (since this is not IE). so we end up launching chrome.exe in low integrity. BUG=51949 TEST=load gcf:about:version in Chrome Frame with IE8 on Win7 and delete browsing history. Review URL: http://codereview.chromium.org/3133019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56361 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.cc')
-rw-r--r--chrome/browser/browsing_data_remover.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index 329149b..c20644f 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -188,7 +188,8 @@ void BrowsingDataRemover::Remove(int remove_mask) {
PasswordStore* password_store =
profile_->GetPasswordStore(Profile::EXPLICIT_ACCESS);
- password_store->RemoveLoginsCreatedBetween(delete_begin_, delete_end_);
+ if (password_store)
+ password_store->RemoveLoginsCreatedBetween(delete_begin_, delete_end_);
}
if (remove_mask & REMOVE_FORM_DATA) {
@@ -197,8 +198,10 @@ void BrowsingDataRemover::Remove(int remove_mask) {
WebDataService* web_data_service =
profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
- web_data_service->RemoveFormElementsAddedBetween(delete_begin_,
- delete_end_);
+ if (web_data_service) {
+ web_data_service->RemoveFormElementsAddedBetween(delete_begin_,
+ delete_end_);
+ }
}
if (remove_mask & REMOVE_CACHE) {