Chromium Code Reviews| 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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 515 waiting_for_clear_history_ = true; | 515 waiting_for_clear_history_ = true; |
| 516 history_service->ExpireLocalAndRemoteHistoryBetween( | 516 history_service->ExpireLocalAndRemoteHistoryBetween( |
| 517 WebHistoryServiceFactory::GetForProfile(profile_), std::set<GURL>(), | 517 WebHistoryServiceFactory::GetForProfile(profile_), std::set<GURL>(), |
| 518 delete_begin_, delete_end_, | 518 delete_begin_, delete_end_, |
| 519 base::Bind(&BrowsingDataRemover::OnHistoryDeletionDone, | 519 base::Bind(&BrowsingDataRemover::OnHistoryDeletionDone, |
| 520 weak_ptr_factory_.GetWeakPtr()), | 520 weak_ptr_factory_.GetWeakPtr()), |
| 521 &history_task_tracker_); | 521 &history_task_tracker_); |
| 522 } | 522 } |
| 523 | 523 |
| 524 ntp_snippets::ContentSuggestionsService* content_suggestions_service = | 524 ntp_snippets::ContentSuggestionsService* content_suggestions_service = |
| 525 ContentSuggestionsServiceFactory::GetForProfile(profile_); | 525 ContentSuggestionsServiceFactory::GetForProfileIfExists(profile_); |
|
Marc Treib
2016/09/15 12:45:09
GetForProfile is called in one more place in this
jkrcal
2016/09/15 12:53:17
Oh, thanks for spotting that!
Bernhard Bauer
2016/09/15 13:44:46
Should we add a DCHECK that the feature is enabled
| |
| 526 if (content_suggestions_service) { | 526 if (content_suggestions_service) { |
| 527 content_suggestions_service->ClearHistory(delete_begin_, delete_end_, | 527 content_suggestions_service->ClearHistory(delete_begin_, delete_end_, |
| 528 filter); | 528 filter); |
| 529 } | 529 } |
| 530 | 530 |
| 531 #if defined(ENABLE_EXTENSIONS) | 531 #if defined(ENABLE_EXTENSIONS) |
| 532 // The extension activity log contains details of which websites extensions | 532 // The extension activity log contains details of which websites extensions |
| 533 // were active on. It therefore indirectly stores details of websites a | 533 // were active on. It therefore indirectly stores details of websites a |
| 534 // user has visited so best clean from here as well. | 534 // user has visited so best clean from here as well. |
| 535 // TODO(msramek): Support all backends with filter (crbug.com/589586). | 535 // TODO(msramek): Support all backends with filter (crbug.com/589586). |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1535 waiting_for_clear_offline_page_data_ = false; | 1535 waiting_for_clear_offline_page_data_ = false; |
| 1536 NotifyIfDone(); | 1536 NotifyIfDone(); |
| 1537 } | 1537 } |
| 1538 #endif | 1538 #endif |
| 1539 | 1539 |
| 1540 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { | 1540 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { |
| 1541 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1541 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1542 waiting_for_clear_domain_reliability_monitor_ = false; | 1542 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1543 NotifyIfDone(); | 1543 NotifyIfDone(); |
| 1544 } | 1544 } |
| OLD | NEW |