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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.h

Issue 2802013002: Move BrowsingDataRemoverImpl:: CompletionInhibitor to the public interface (Closed)
Patch Set: Finishing after shutdown is still OK. 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
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/browsing_data_remover.h
diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h
index 4edae603f8cec0bf941a4b7d46dc32c73dbfe4fd..757d8a8af6ade18ddbea5640c63103905df90a25 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.h
+++ b/chrome/browser/browsing_data/browsing_data_remover.h
@@ -7,6 +7,7 @@
#include <memory>
#include "base/callback_forward.h"
+#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/browsing_data/browsing_data_remover_delegate.h"
@@ -179,6 +180,14 @@ class BrowsingDataRemover : public KeyedService {
virtual void AddObserver(Observer* observer) = 0;
virtual void RemoveObserver(Observer* observer) = 0;
+ // A |callback| that will be called just before a deletion task is completed
+ // and observers are notified. The receiver must respond by calling
+ // |continue_to_completion| to finish the task. Used in tests to artificially
+ // prolong execution.
+ virtual void SetWouldCompleteCallbackForTesting(
+ const base::Callback<void(const base::Closure& continue_to_completion)>&
+ callback) = 0;
+
// Parameters of the last call are exposed to be used by tests. Removal and
// origin type masks equal to -1 mean that no removal has ever been executed.
// TODO(msramek): If other consumers than tests are interested in this,
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698