| Index: chrome/browser/browsing_data/browsing_data_remover_impl.cc
|
| diff --git a/chrome/browser/browsing_data/browsing_data_remover_impl.cc b/chrome/browser/browsing_data/browsing_data_remover_impl.cc
|
| index 68de911c55f96e185d6238384b436518978b2b49..88603ec631dad33c0b8972df2c8e11d6f4f0f738 100644
|
| --- a/chrome/browser/browsing_data/browsing_data_remover_impl.cc
|
| +++ b/chrome/browser/browsing_data/browsing_data_remover_impl.cc
|
| @@ -151,9 +151,6 @@ void ClearChannelIDsOnIOThread(
|
|
|
| } // namespace
|
|
|
| -BrowsingDataRemoverImpl::CompletionInhibitor*
|
| - BrowsingDataRemoverImpl::completion_inhibitor_ = nullptr;
|
| -
|
| BrowsingDataRemoverImpl::SubTask::SubTask(const base::Closure& forward_callback)
|
| : is_pending_(false),
|
| forward_callback_(forward_callback),
|
| @@ -196,6 +193,7 @@ BrowsingDataRemoverImpl::BrowsingDataRemoverImpl(
|
| clear_channel_ids_(sub_task_forward_callback_),
|
| clear_http_auth_cache_(sub_task_forward_callback_),
|
| clear_storage_partition_data_(sub_task_forward_callback_),
|
| + storage_partition_for_testing_(nullptr),
|
| weak_ptr_factory_(this) {
|
| DCHECK(browser_context_);
|
| }
|
| @@ -577,6 +575,12 @@ void BrowsingDataRemoverImpl::RemoveObserver(Observer* observer) {
|
| observer_list_.RemoveObserver(observer);
|
| }
|
|
|
| +void BrowsingDataRemoverImpl::SetWouldCompleteCallbackForTesting(
|
| + const base::Callback<void(const base::Closure& continue_to_completion)>&
|
| + callback) {
|
| + would_complete_callback_ = callback;
|
| +}
|
| +
|
| void BrowsingDataRemoverImpl::OverrideStoragePartitionForTesting(
|
| content::StoragePartition* storage_partition) {
|
| storage_partition_for_testing_ = storage_partition;
|
| @@ -667,9 +671,9 @@ void BrowsingDataRemoverImpl::NotifyIfDone() {
|
| if (!AllDone())
|
| return;
|
|
|
| - if (completion_inhibitor_) {
|
| - completion_inhibitor_->OnBrowsingDataRemoverWouldComplete(
|
| - this, base::Bind(&BrowsingDataRemoverImpl::Notify, GetWeakPtr()));
|
| + if (!would_complete_callback_.is_null()) {
|
| + would_complete_callback_.Run(
|
| + base::Bind(&BrowsingDataRemoverImpl::Notify, GetWeakPtr()));
|
| return;
|
| }
|
|
|
|
|