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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 11 #include "base/time/time.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 #include "chrome/browser/browsing_data/browsing_data_remover_delegate.h" 13 #include "chrome/browser/browsing_data/browsing_data_remover_delegate.h"
13 #include "components/keyed_service/core/keyed_service.h" 14 #include "components/keyed_service/core/keyed_service.h"
14 15
15 namespace content { 16 namespace content {
16 class BrowsingDataFilterBuilder; 17 class BrowsingDataFilterBuilder;
17 } 18 }
18 19
19 //////////////////////////////////////////////////////////////////////////////// 20 ////////////////////////////////////////////////////////////////////////////////
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 const base::Time& delete_end, 173 const base::Time& delete_end,
173 int remove_mask, 174 int remove_mask,
174 int origin_type_mask, 175 int origin_type_mask,
175 std::unique_ptr<content::BrowsingDataFilterBuilder> filter_builder, 176 std::unique_ptr<content::BrowsingDataFilterBuilder> filter_builder,
176 Observer* observer) = 0; 177 Observer* observer) = 0;
177 178
178 // Observers. 179 // Observers.
179 virtual void AddObserver(Observer* observer) = 0; 180 virtual void AddObserver(Observer* observer) = 0;
180 virtual void RemoveObserver(Observer* observer) = 0; 181 virtual void RemoveObserver(Observer* observer) = 0;
181 182
183 // A |callback| that will be called just before a deletion task is completed
184 // and observers are notified. The receiver must respond by calling
185 // |continue_to_completion| to finish the task. Used in tests to artificially
186 // prolong execution.
187 virtual void SetWouldCompleteCallbackForTesting(
188 const base::Callback<void(const base::Closure& continue_to_completion)>&
189 callback) = 0;
190
182 // Parameters of the last call are exposed to be used by tests. Removal and 191 // Parameters of the last call are exposed to be used by tests. Removal and
183 // origin type masks equal to -1 mean that no removal has ever been executed. 192 // origin type masks equal to -1 mean that no removal has ever been executed.
184 // TODO(msramek): If other consumers than tests are interested in this, 193 // TODO(msramek): If other consumers than tests are interested in this,
185 // consider returning them in OnBrowsingDataRemoverDone() callback. If not, 194 // consider returning them in OnBrowsingDataRemoverDone() callback. If not,
186 // consider simplifying this interface by removing these methods and changing 195 // consider simplifying this interface by removing these methods and changing
187 // the tests to record the parameters using GMock instead. 196 // the tests to record the parameters using GMock instead.
188 virtual const base::Time& GetLastUsedBeginTime() = 0; 197 virtual const base::Time& GetLastUsedBeginTime() = 0;
189 virtual const base::Time& GetLastUsedEndTime() = 0; 198 virtual const base::Time& GetLastUsedEndTime() = 0;
190 virtual int GetLastUsedRemovalMask() = 0; 199 virtual int GetLastUsedRemovalMask() = 0;
191 virtual int GetLastUsedOriginTypeMask() = 0; 200 virtual int GetLastUsedOriginTypeMask() = 0;
192 }; 201 };
193 202
194 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 203 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
OLDNEW
« 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