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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover_impl.cc

Issue 2802013002: Move BrowsingDataRemoverImpl:: CompletionInhibitor to the public interface (Closed)
Patch Set: Created 3 years, 8 months 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
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 b157897e73a9e8c3a7e57764097d673c1f18a5c0..55f917d443c16952baa5599d884b93e2362aed8a 100644
--- a/chrome/browser/browsing_data/browsing_data_remover_impl.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover_impl.cc
@@ -124,9 +124,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),
@@ -160,6 +157,7 @@ BrowsingDataRemoverImpl::BrowsingDataRemoverImpl(
remove_mask_(-1),
origin_type_mask_(-1),
is_removing_(false),
+ completion_inhibitor_(nullptr),
sub_task_forward_callback_(
base::Bind(&BrowsingDataRemoverImpl::NotifyIfDone,
base::Unretained(this))),
@@ -169,6 +167,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_);
}
@@ -568,6 +567,11 @@ void BrowsingDataRemoverImpl::RemoveObserver(Observer* observer) {
observer_list_.RemoveObserver(observer);
}
+void BrowsingDataRemoverImpl::SetCompletionInhibitorForTesting(
+ CompletionInhibitor* inhibitor) {
+ completion_inhibitor_ = inhibitor;
+}
+
void BrowsingDataRemoverImpl::OverrideStoragePartitionForTesting(
content::StoragePartition* storage_partition) {
storage_partition_for_testing_ = storage_partition;

Powered by Google App Engine
This is Rietveld 408576698