| Index: ios/net/http_cache_helper.cc
|
| diff --git a/ios/net/http_cache_helper.cc b/ios/net/http_cache_helper.cc
|
| index 5aa57a1db7238f290980668f42797984370df0ec..12b91aa1bc50501295fdc7cac3cb7514de21e949 100644
|
| --- a/ios/net/http_cache_helper.cc
|
| +++ b/ios/net/http_cache_helper.cc
|
| @@ -33,11 +33,14 @@ void PostCallback(const scoped_refptr<base::TaskRunner>& task_runner,
|
| // Clears the disk_cache::Backend on the IO thread and deletes |backend|.
|
| void DoomHttpCache(std::unique_ptr<disk_cache::Backend*> backend,
|
| const scoped_refptr<base::TaskRunner>& client_task_runner,
|
| + const base::Time& delete_begin,
|
| + const base::Time& delete_end,
|
| const net::CompletionCallback& callback,
|
| int error) {
|
| // |*backend| may be null in case of error.
|
| if (*backend) {
|
| - (*backend)->DoomAllEntries(
|
| + (*backend)->DoomEntriesBetween(
|
| + delete_begin, delete_end,
|
| base::Bind(&PostCallback, client_task_runner, callback));
|
| } else {
|
| client_task_runner->PostTask(FROM_HERE, base::Bind(callback, error));
|
| @@ -49,6 +52,8 @@ void DoomHttpCache(std::unique_ptr<disk_cache::Backend*> backend,
|
| void ClearHttpCacheOnIOThread(
|
| const scoped_refptr<net::URLRequestContextGetter>& getter,
|
| const scoped_refptr<base::TaskRunner>& client_task_runner,
|
| + const base::Time& delete_begin,
|
| + const base::Time& delete_end,
|
| const net::CompletionCallback& callback) {
|
| net::HttpCache* http_cache =
|
| getter->GetURLRequestContext()->http_transaction_factory()->GetCache();
|
| @@ -72,7 +77,7 @@ void ClearHttpCacheOnIOThread(
|
| disk_cache::Backend** backend_ptr = backend.get();
|
| net::CompletionCallback doom_callback =
|
| base::Bind(&DoomHttpCache, base::Passed(std::move(backend)),
|
| - client_task_runner, callback);
|
| + client_task_runner, delete_begin, delete_end, callback);
|
|
|
| int rv = http_cache->GetBackend(backend_ptr, doom_callback);
|
|
|
| @@ -89,10 +94,14 @@ namespace net {
|
|
|
| void ClearHttpCache(const scoped_refptr<net::URLRequestContextGetter>& getter,
|
| const scoped_refptr<base::TaskRunner>& network_task_runner,
|
| + const base::Time& delete_begin,
|
| + const base::Time& delete_end,
|
| const net::CompletionCallback& callback) {
|
| + DCHECK(delete_end != base::Time());
|
| network_task_runner->PostTask(
|
| FROM_HERE, base::Bind(&ClearHttpCacheOnIOThread, getter,
|
| - base::ThreadTaskRunnerHandle::Get(), callback));
|
| + base::ThreadTaskRunnerHandle::Get(), delete_begin,
|
| + delete_end, callback));
|
| }
|
|
|
| } // namespace net
|
|
|