summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_remover.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/browsing_data_remover.cc')
-rw-r--r--chrome/browser/browsing_data_remover.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index 8ae410b..e1de6f6 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -131,13 +131,15 @@ void BrowsingDataRemover::Remove(int remove_mask) {
// Need to clear the host cache and accumulated speculative data, as it also
// reveals some history.
- waiting_for_clear_networking_history_ = true;
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- NewRunnableMethod(
- this,
- &BrowsingDataRemover::ClearNetworkingHistory,
- g_browser_process->io_thread()));
+ if (g_browser_process->io_thread()) {
+ waiting_for_clear_networking_history_ = true;
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ NewRunnableMethod(
+ this,
+ &BrowsingDataRemover::ClearNetworkingHistory,
+ g_browser_process->io_thread()));
+ }
// As part of history deletion we also delete the auto-generated keywords.
TemplateURLModel* keywords_model = profile_->GetTemplateURLModel();
@@ -339,7 +341,8 @@ void BrowsingDataRemover::NotifyAndDeleteIfDone() {
// cookies and passwords. Simplest just to always clear it. Must be cleared
// after the cache, as cleaning up the disk cache exposes some of the history
// in the NetLog.
- g_browser_process->net_log()->ClearAllPassivelyCapturedEvents();
+ if (g_browser_process->net_log())
+ g_browser_process->net_log()->ClearAllPassivelyCapturedEvents();
removing_ = false;
FOR_EACH_OBSERVER(Observer, observer_list_, OnBrowsingDataRemoverDone());