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

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

Issue 2284393002: Add ClearHistory() to ContentSuggestionsService and its providers (Closed)
Patch Set: msramek@'s comments and filter. Created 4 years, 3 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
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 #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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 506
507 #if defined(ENABLE_EXTENSIONS) 507 #if defined(ENABLE_EXTENSIONS)
508 // The extension activity contains details of which websites extensions 508 // The extension activity contains details of which websites extensions
509 // were active on. It therefore indirectly stores details of websites a 509 // were active on. It therefore indirectly stores details of websites a
510 // user has visited so best clean from here as well. 510 // user has visited so best clean from here as well.
511 extensions::ActivityLog::GetInstance(profile_)->RemoveURLs( 511 extensions::ActivityLog::GetInstance(profile_)->RemoveURLs(
512 std::set<GURL>()); 512 std::set<GURL>());
513 #endif 513 #endif
514 } 514 }
515 515
516 ntp_snippets::ContentSuggestionsService* content_suggestions_service =
517 ContentSuggestionsServiceFactory::GetForProfile(profile_);
518 if (content_suggestions_service) {
519 content_suggestions_service->ClearHistory(delete_begin_, delete_end_,
520 filter);
521 }
522
516 #if defined(ENABLE_EXTENSIONS) 523 #if defined(ENABLE_EXTENSIONS)
517 // Clear launch times as they are a form of history. 524 // Clear launch times as they are a form of history.
518 extensions::ExtensionPrefs* extension_prefs = 525 extensions::ExtensionPrefs* extension_prefs =
519 extensions::ExtensionPrefs::Get(profile_); 526 extensions::ExtensionPrefs::Get(profile_);
520 extension_prefs->ClearLastLaunchTimes(); 527 extension_prefs->ClearLastLaunchTimes();
521 #endif 528 #endif
522 529
523 // The power consumption history by origin contains details of websites 530 // The power consumption history by origin contains details of websites
524 // that were visited. 531 // that were visited.
525 power::OriginPowerMap* origin_power_map = 532 power::OriginPowerMap* origin_power_map =
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 waiting_for_clear_offline_page_data_ = false; 1499 waiting_for_clear_offline_page_data_ = false;
1493 NotifyIfDone(); 1500 NotifyIfDone();
1494 } 1501 }
1495 #endif 1502 #endif
1496 1503
1497 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { 1504 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() {
1498 DCHECK_CURRENTLY_ON(BrowserThread::UI); 1505 DCHECK_CURRENTLY_ON(BrowserThread::UI);
1499 waiting_for_clear_domain_reliability_monitor_ = false; 1506 waiting_for_clear_domain_reliability_monitor_ = false;
1500 NotifyIfDone(); 1507 NotifyIfDone();
1501 } 1508 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698