| 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 <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "components/nacl/browser/pnacl_host.h" | 58 #include "components/nacl/browser/pnacl_host.h" |
| 59 #include "components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h" | 59 #include "components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h" |
| 60 #include "components/ntp_snippets/content_suggestions_service.h" | 60 #include "components/ntp_snippets/content_suggestions_service.h" |
| 61 #include "components/omnibox/browser/omnibox_pref_names.h" | 61 #include "components/omnibox/browser/omnibox_pref_names.h" |
| 62 #include "components/password_manager/core/browser/password_store.h" | 62 #include "components/password_manager/core/browser/password_store.h" |
| 63 #include "components/prefs/pref_service.h" | 63 #include "components/prefs/pref_service.h" |
| 64 #include "components/previews/core/previews_ui_service.h" | 64 #include "components/previews/core/previews_ui_service.h" |
| 65 #include "components/search_engines/template_url_service.h" | 65 #include "components/search_engines/template_url_service.h" |
| 66 #include "components/sessions/core/tab_restore_service.h" | 66 #include "components/sessions/core/tab_restore_service.h" |
| 67 #include "components/translate/core/browser/language_model.h" | 67 #include "components/translate/core/browser/language_model.h" |
| 68 #include "components/web_cache/browser/web_cache_manager.h" |
| 68 #include "content/public/browser/browsing_data_filter_builder.h" | 69 #include "content/public/browser/browsing_data_filter_builder.h" |
| 69 #include "content/public/browser/plugin_data_remover.h" | 70 #include "content/public/browser/plugin_data_remover.h" |
| 70 #include "content/public/browser/ssl_host_state_delegate.h" | 71 #include "content/public/browser/ssl_host_state_delegate.h" |
| 71 #include "content/public/browser/storage_partition.h" | 72 #include "content/public/browser/storage_partition.h" |
| 72 #include "content/public/browser/user_metrics.h" | 73 #include "content/public/browser/user_metrics.h" |
| 73 #include "net/cookies/cookie_store.h" | 74 #include "net/cookies/cookie_store.h" |
| 74 #include "net/http/http_transaction_factory.h" | 75 #include "net/http/http_transaction_factory.h" |
| 75 #include "net/url_request/url_request_context.h" | 76 #include "net/url_request/url_request_context.h" |
| 76 #include "net/url_request/url_request_context_getter.h" | 77 #include "net/url_request/url_request_context_getter.h" |
| 77 #include "url/url_util.h" | 78 #include "url/url_util.h" |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 autofill::PersonalDataManager* data_manager = | 793 autofill::PersonalDataManager* data_manager = |
| 793 autofill::PersonalDataManagerFactory::GetForProfile(profile_); | 794 autofill::PersonalDataManagerFactory::GetForProfile(profile_); |
| 794 if (data_manager) | 795 if (data_manager) |
| 795 data_manager->Refresh(); | 796 data_manager->Refresh(); |
| 796 } | 797 } |
| 797 } | 798 } |
| 798 | 799 |
| 799 ////////////////////////////////////////////////////////////////////////////// | 800 ////////////////////////////////////////////////////////////////////////////// |
| 800 // DATA_TYPE_CACHE | 801 // DATA_TYPE_CACHE |
| 801 if (remove_mask & BrowsingDataRemover::DATA_TYPE_CACHE) { | 802 if (remove_mask & BrowsingDataRemover::DATA_TYPE_CACHE) { |
| 803 // Tell the renderers to clear their cache. |
| 804 // TODO(crbug.com/668114): Renderer cache is a platform concept, and should |
| 805 // live in BrowsingDataRemoverImpl. However, WebCacheManager itself is |
| 806 // a component with dependency on content/browser. Untangle these |
| 807 // dependencies or reimplement the relevant part of WebCacheManager |
| 808 // in content/browser. |
| 809 web_cache::WebCacheManager::GetInstance()->ClearCache(); |
| 810 |
| 802 #if !defined(DISABLE_NACL) | 811 #if !defined(DISABLE_NACL) |
| 803 clear_nacl_cache_.Start(); | 812 clear_nacl_cache_.Start(); |
| 804 | 813 |
| 805 BrowserThread::PostTask( | 814 BrowserThread::PostTask( |
| 806 BrowserThread::IO, FROM_HERE, | 815 BrowserThread::IO, FROM_HERE, |
| 807 base::Bind(&ClearNaClCacheOnIOThread, | 816 base::Bind(&ClearNaClCacheOnIOThread, |
| 808 UIThreadTrampoline( | 817 UIThreadTrampoline( |
| 809 clear_nacl_cache_.GetCompletionCallback()))); | 818 clear_nacl_cache_.GetCompletionCallback()))); |
| 810 | 819 |
| 811 clear_pnacl_cache_.Start(); | 820 clear_pnacl_cache_.Start(); |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 } | 1123 } |
| 1115 | 1124 |
| 1116 void ChromeBrowsingDataRemoverDelegate:: | 1125 void ChromeBrowsingDataRemoverDelegate:: |
| 1117 OnDeauthorizeFlashContentLicensesCompleted( | 1126 OnDeauthorizeFlashContentLicensesCompleted( |
| 1118 uint32_t request_id, | 1127 uint32_t request_id, |
| 1119 bool /* success */) { | 1128 bool /* success */) { |
| 1120 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_); | 1129 DCHECK_EQ(request_id, deauthorize_flash_content_licenses_request_id_); |
| 1121 clear_flash_content_licenses_.GetCompletionCallback().Run(); | 1130 clear_flash_content_licenses_.GetCompletionCallback().Run(); |
| 1122 } | 1131 } |
| 1123 #endif | 1132 #endif |
| OLD | NEW |