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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.h

Issue 2504943002: Remove the "one at a time" restriction from the browsingData API (Closed)
Patch Set: Created 4 years, 1 month 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/extensions/api/browsing_data/browsing_data_api.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 // A common reduction of all public Remove[WithFilter][AndReply] methods. 299 // A common reduction of all public Remove[WithFilter][AndReply] methods.
300 virtual void RemoveInternal( 300 virtual void RemoveInternal(
301 const TimeRange& time_range, 301 const TimeRange& time_range,
302 int remove_mask, 302 int remove_mask,
303 int origin_type_mask, 303 int origin_type_mask,
304 std::unique_ptr<BrowsingDataFilterBuilder> filter_builder, 304 std::unique_ptr<BrowsingDataFilterBuilder> filter_builder,
305 Observer* observer); 305 Observer* observer);
306 306
307 private: 307 private:
308 // The clear API needs to be able to toggle removing_ in order to test that
309 // only one BrowsingDataRemover instance can be called at a time.
310 FRIEND_TEST_ALL_PREFIXES(ExtensionBrowsingDataTest, OneAtATime);
311 // Testing the private RemovalTask. 308 // Testing the private RemovalTask.
312 FRIEND_TEST_ALL_PREFIXES(BrowsingDataRemoverTest, MultipleTasks); 309 FRIEND_TEST_ALL_PREFIXES(BrowsingDataRemoverTest, MultipleTasks);
313 310
314 // The BrowsingDataRemover tests need to be able to access the implementation 311 // The BrowsingDataRemover tests need to be able to access the implementation
315 // of Remove(), as it exposes details that aren't yet available in the public 312 // of Remove(), as it exposes details that aren't yet available in the public
316 // API. As soon as those details are exposed via new methods, this should be 313 // API. As soon as those details are exposed via new methods, this should be
317 // removed. 314 // removed.
318 // 315 //
319 // TODO(mkwst): See http://crbug.com/113621 316 // TODO(mkwst): See http://crbug.com/113621
320 friend class BrowsingDataRemoverTest; 317 friend class BrowsingDataRemoverTest;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 // not initialised, so the registry must be mocked out. 560 // not initialised, so the registry must be mocked out.
564 std::unique_ptr<WebappRegistry> webapp_registry_; 561 std::unique_ptr<WebappRegistry> webapp_registry_;
565 #endif 562 #endif
566 563
567 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_; 564 base::WeakPtrFactory<BrowsingDataRemover> weak_ptr_factory_;
568 565
569 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); 566 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
570 }; 567 };
571 568
572 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 569 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/browsing_data/browsing_data_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698