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

Unified Diff: chrome/browser/android/preferences/pref_service_bridge.cc

Issue 2578723002: Reduce BrowsingDataRemover's dependencies on Chrome (Closed)
Patch Set: A new callsite appeared through rebase - fixed the compilation error. Created 3 years, 12 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/android/signin/signin_manager_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/preferences/pref_service_bridge.cc
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
index dcb62ecb3e2f0dececb066ad88d6fb0b7ae33d40..5c448a7fe24ba611d000bc45528fc399ff68c31e 100644
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -668,10 +668,14 @@ static void ClearBrowsingData(
ClearBrowsingDataObserver* observer = new ClearBrowsingDataObserver(
env, obj, browsing_data_remover, 2 /* tasks_count */);
+ browsing_data::TimePeriod period =
+ static_cast<browsing_data::TimePeriod>(time_period);
+ browsing_data::RecordDeletionForPeriod(period);
+
if (filterable_mask) {
browsing_data_remover->RemoveWithFilterAndReply(
- BrowsingDataRemover::Period(
- static_cast<browsing_data::TimePeriod>(time_period)),
+ browsing_data::CalculateBeginDeleteTime(period),
+ browsing_data::CalculateEndDeleteTime(period),
filterable_mask, BrowsingDataHelper::UNPROTECTED_WEB,
std::move(filter_builder), observer);
} else {
@@ -681,8 +685,8 @@ static void ClearBrowsingData(
if (nonfilterable_mask) {
browsing_data_remover->RemoveAndReply(
- BrowsingDataRemover::Period(
- static_cast<browsing_data::TimePeriod>(time_period)),
+ browsing_data::CalculateBeginDeleteTime(period),
+ browsing_data::CalculateEndDeleteTime(period),
nonfilterable_mask, BrowsingDataHelper::UNPROTECTED_WEB, observer);
} else {
// Make sure |observer| doesn't wait for the non-filtered task.
« no previous file with comments | « no previous file | chrome/browser/android/signin/signin_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698