OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chrome_browsing_data_remover_delegate.h" | 5 #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h" |
6 | 6 |
7 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 7 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/browsing_data/browsing_data_filter_builder.h" | 10 #include "chrome/browser/browsing_data/browsing_data_filter_builder.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 | 286 |
287 // Currently, ContentSuggestionService instance exists only on Android. | 287 // Currently, ContentSuggestionService instance exists only on Android. |
288 ntp_snippets::ContentSuggestionsService* content_suggestions_service = | 288 ntp_snippets::ContentSuggestionsService* content_suggestions_service = |
289 ContentSuggestionsServiceFactory::GetForProfileIfExists(profile_); | 289 ContentSuggestionsServiceFactory::GetForProfileIfExists(profile_); |
290 if (content_suggestions_service) { | 290 if (content_suggestions_service) { |
291 content_suggestions_service->ClearHistory(delete_begin_, delete_end_, | 291 content_suggestions_service->ClearHistory(delete_begin_, delete_end_, |
292 filter); | 292 filter); |
293 } | 293 } |
294 | 294 |
295 // Remove the last visit dates meta-data from the bookmark model. | 295 // Remove the last visit dates meta-data from the bookmark model. |
296 // TODO(vitaliii): Do not remove all dates, but only the ones matched by the | 296 // TODO(vitaliii): Do not remove all dates, but only the ones matched by the |
msramek
2017/01/04 11:47:12
nit: This TODO seems to be addressed.
tschumann
2017/01/04 13:32:32
Done.
| |
297 // time range and the filter. | 297 // time range and the filter. |
298 bookmarks::BookmarkModel* bookmark_model = | 298 bookmarks::BookmarkModel* bookmark_model = |
299 BookmarkModelFactory::GetForBrowserContext(profile_); | 299 BookmarkModelFactory::GetForBrowserContext(profile_); |
300 if (bookmark_model) | 300 if (bookmark_model) { |
301 ntp_snippets::RemoveAllLastVisitDates(bookmark_model); | 301 ntp_snippets::RemoveLastVisitedDatesBetween(delete_begin_, delete_end_, |
msramek
2017/01/04 11:47:12
Could you update BrowsingDataRemoverTest? You can
tschumann
2017/01/04 13:32:32
Done. Deeper test coverage is in bookmark_last_vis
| |
302 filter, bookmark_model); | |
303 } | |
302 | 304 |
303 #if BUILDFLAG(ENABLE_EXTENSIONS) | 305 #if BUILDFLAG(ENABLE_EXTENSIONS) |
304 // The extension activity log contains details of which websites extensions | 306 // The extension activity log contains details of which websites extensions |
305 // were active on. It therefore indirectly stores details of websites a | 307 // were active on. It therefore indirectly stores details of websites a |
306 // user has visited so best clean from here as well. | 308 // user has visited so best clean from here as well. |
307 // TODO(msramek): Support all backends with filter (crbug.com/589586). | 309 // TODO(msramek): Support all backends with filter (crbug.com/589586). |
308 extensions::ActivityLog::GetInstance(profile_)->RemoveURLs( | 310 extensions::ActivityLog::GetInstance(profile_)->RemoveURLs( |
309 std::set<GURL>()); | 311 std::set<GURL>()); |
310 | 312 |
311 // Clear launch times as they are a form of history. | 313 // Clear launch times as they are a form of history. |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
847 | 849 |
848 #if defined(OS_CHROMEOS) | 850 #if defined(OS_CHROMEOS) |
849 void ChromeBrowsingDataRemoverDelegate::OnClearPlatformKeys( | 851 void ChromeBrowsingDataRemoverDelegate::OnClearPlatformKeys( |
850 chromeos::DBusMethodCallStatus call_status, | 852 chromeos::DBusMethodCallStatus call_status, |
851 bool result) { | 853 bool result) { |
852 LOG_IF(ERROR, call_status != chromeos::DBUS_METHOD_CALL_SUCCESS || !result) | 854 LOG_IF(ERROR, call_status != chromeos::DBUS_METHOD_CALL_SUCCESS || !result) |
853 << "Failed to clear platform keys."; | 855 << "Failed to clear platform keys."; |
854 clear_platform_keys_.GetCompletionCallback().Run(); | 856 clear_platform_keys_.GetCompletionCallback().Run(); |
855 } | 857 } |
856 #endif | 858 #endif |
OLD | NEW |