Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6707)

Unified Diff: chrome/browser/browsing_data_remover.cc

Issue 378015: Clear disk cache when the cache is not initialized (Closed)
Patch Set: simple test Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index 0a646fa563cb9ea6a8ec010213417adbe8537dfe..4477ce7137adabe5302ff6241989d77de092f6bb 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -240,10 +240,9 @@ void BrowsingDataRemover::ClearCacheOnIOThread(
// Get a pointer to the cache.
net::HttpTransactionFactory* factory =
main_context_getter->GetURLRequestContext()->http_transaction_factory();
- disk_cache::Backend* cache = factory->GetCache()->disk_cache();
+ disk_cache::Backend* cache = factory->GetCache()->GetBackend();
- // |cache| can be null since it is lazily initialized, in this case we do
- // nothing.
+ // |cache| can be null if it cannot be initialized.
if (cache) {
if (delete_begin.is_null())
cache->DoomAllEntries();
@@ -254,10 +253,9 @@ void BrowsingDataRemover::ClearCacheOnIOThread(
// Get a pointer to the media cache.
factory = media_context_getter->GetURLRequestContext()->
http_transaction_factory();
- cache = factory->GetCache()->disk_cache();
+ cache = factory->GetCache()->GetBackend();
- // |cache| can be null since it is lazily initialized, in this case we do
- // nothing.
+ // |cache| can be null if it cannot be initialized.
if (cache) {
if (delete_begin.is_null())
cache->DoomAllEntries();
« no previous file with comments | « no previous file | net/http/http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698