OLD | NEW |
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 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 5 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 base::Time removal_begin, | 283 base::Time removal_begin, |
284 int removal_mask, | 284 int removal_mask, |
285 int origin_type_mask) | 285 int origin_type_mask) |
286 : removal_begin(removal_begin), | 286 : removal_begin(removal_begin), |
287 removal_mask(removal_mask), | 287 removal_mask(removal_mask), |
288 origin_type_mask(origin_type_mask) { | 288 origin_type_mask(origin_type_mask) { |
289 } | 289 } |
290 | 290 |
291 BrowsingDataRemover::NotificationDetails::~NotificationDetails() {} | 291 BrowsingDataRemover::NotificationDetails::~NotificationDetails() {} |
292 | 292 |
| 293 bool BrowsingDataRemover::TimeRange::operator==( |
| 294 const BrowsingDataRemover::TimeRange& other) const { |
| 295 return begin == other.begin && end == other.end; |
| 296 } |
| 297 |
293 // static | 298 // static |
294 BrowsingDataRemover::TimeRange BrowsingDataRemover::Unbounded() { | 299 BrowsingDataRemover::TimeRange BrowsingDataRemover::Unbounded() { |
295 return TimeRange(base::Time(), base::Time::Max()); | 300 return TimeRange(base::Time(), base::Time::Max()); |
296 } | 301 } |
297 | 302 |
298 // static | 303 // static |
299 BrowsingDataRemover::TimeRange BrowsingDataRemover::Period( | 304 BrowsingDataRemover::TimeRange BrowsingDataRemover::Period( |
300 browsing_data::TimePeriod period) { | 305 browsing_data::TimePeriod period) { |
301 switch (period) { | 306 switch (period) { |
302 case browsing_data::LAST_HOUR: | 307 case browsing_data::LAST_HOUR: |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 waiting_for_clear_domain_reliability_monitor_ = false; | 1317 waiting_for_clear_domain_reliability_monitor_ = false; |
1313 NotifyIfDone(); | 1318 NotifyIfDone(); |
1314 } | 1319 } |
1315 | 1320 |
1316 // static | 1321 // static |
1317 BrowsingDataRemover::CallbackSubscription | 1322 BrowsingDataRemover::CallbackSubscription |
1318 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1323 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
1319 const BrowsingDataRemover::Callback& callback) { | 1324 const BrowsingDataRemover::Callback& callback) { |
1320 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1325 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
1321 } | 1326 } |
OLD | NEW |