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 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/chromeos/login/user_manager.h" | 22 #include "chrome/browser/chromeos/login/user_manager.h" |
23 #endif | 23 #endif |
24 #include "chrome/browser/download/download_prefs.h" | 24 #include "chrome/browser/download/download_prefs.h" |
25 #include "chrome/browser/download/download_service_factory.h" | 25 #include "chrome/browser/download/download_service_factory.h" |
26 #include "chrome/browser/extensions/activity_log/activity_log.h" | 26 #include "chrome/browser/extensions/activity_log/activity_log.h" |
27 #include "chrome/browser/extensions/extension_service.h" | 27 #include "chrome/browser/extensions/extension_service.h" |
28 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 28 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
29 #include "chrome/browser/history/history_service.h" | 29 #include "chrome/browser/history/history_service.h" |
30 #include "chrome/browser/history/history_service_factory.h" | 30 #include "chrome/browser/history/history_service_factory.h" |
31 #include "chrome/browser/io_thread.h" | 31 #include "chrome/browser/io_thread.h" |
32 #include "chrome/browser/nacl_host/pnacl_host.h" | |
33 #include "chrome/browser/net/chrome_url_request_context.h" | 32 #include "chrome/browser/net/chrome_url_request_context.h" |
34 #include "chrome/browser/net/predictor.h" | 33 #include "chrome/browser/net/predictor.h" |
35 #include "chrome/browser/password_manager/password_store.h" | 34 #include "chrome/browser/password_manager/password_store.h" |
36 #include "chrome/browser/password_manager/password_store_factory.h" | 35 #include "chrome/browser/password_manager/password_store_factory.h" |
37 #include "chrome/browser/predictors/logged_in_predictor_table.h" | 36 #include "chrome/browser/predictors/logged_in_predictor_table.h" |
38 #include "chrome/browser/predictors/predictor_database.h" | 37 #include "chrome/browser/predictors/predictor_database.h" |
39 #include "chrome/browser/predictors/predictor_database_factory.h" | 38 #include "chrome/browser/predictors/predictor_database_factory.h" |
40 #include "chrome/browser/prerender/prerender_manager.h" | 39 #include "chrome/browser/prerender/prerender_manager.h" |
41 #include "chrome/browser/prerender/prerender_manager_factory.h" | 40 #include "chrome/browser/prerender/prerender_manager_factory.h" |
42 #include "chrome/browser/profiles/profile.h" | 41 #include "chrome/browser/profiles/profile.h" |
43 #include "chrome/browser/renderer_host/web_cache_manager.h" | 42 #include "chrome/browser/renderer_host/web_cache_manager.h" |
44 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 43 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
45 #include "chrome/browser/search_engines/template_url_service.h" | 44 #include "chrome/browser/search_engines/template_url_service.h" |
46 #include "chrome/browser/search_engines/template_url_service_factory.h" | 45 #include "chrome/browser/search_engines/template_url_service_factory.h" |
47 #include "chrome/browser/sessions/session_service.h" | 46 #include "chrome/browser/sessions/session_service.h" |
48 #include "chrome/browser/sessions/session_service_factory.h" | 47 #include "chrome/browser/sessions/session_service_factory.h" |
49 #include "chrome/browser/sessions/tab_restore_service.h" | 48 #include "chrome/browser/sessions/tab_restore_service.h" |
50 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 49 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
51 #include "chrome/common/pref_names.h" | 50 #include "chrome/common/pref_names.h" |
52 #include "chrome/common/url_constants.h" | 51 #include "chrome/common/url_constants.h" |
53 #if defined(OS_CHROMEOS) | 52 #if defined(OS_CHROMEOS) |
54 #include "chromeos/attestation/attestation_constants.h" | 53 #include "chromeos/attestation/attestation_constants.h" |
55 #include "chromeos/dbus/cryptohome_client.h" | 54 #include "chromeos/dbus/cryptohome_client.h" |
56 #include "chromeos/dbus/dbus_thread_manager.h" | 55 #include "chromeos/dbus/dbus_thread_manager.h" |
57 #endif | 56 #endif |
58 #include "components/autofill/core/browser/personal_data_manager.h" | 57 #include "components/autofill/core/browser/personal_data_manager.h" |
59 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 58 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
60 #include "components/nacl/browser/nacl_browser.h" | 59 #include "components/nacl/browser/nacl_browser.h" |
| 60 #include "components/nacl/browser/pnacl_host.h" |
61 #include "content/public/browser/browser_thread.h" | 61 #include "content/public/browser/browser_thread.h" |
62 #include "content/public/browser/dom_storage_context.h" | 62 #include "content/public/browser/dom_storage_context.h" |
63 #include "content/public/browser/download_manager.h" | 63 #include "content/public/browser/download_manager.h" |
64 #include "content/public/browser/local_storage_usage_info.h" | 64 #include "content/public/browser/local_storage_usage_info.h" |
65 #include "content/public/browser/notification_service.h" | 65 #include "content/public/browser/notification_service.h" |
66 #include "content/public/browser/plugin_data_remover.h" | 66 #include "content/public/browser/plugin_data_remover.h" |
67 #include "content/public/browser/session_storage_usage_info.h" | 67 #include "content/public/browser/session_storage_usage_info.h" |
68 #include "content/public/browser/storage_partition.h" | 68 #include "content/public/browser/storage_partition.h" |
69 #include "content/public/browser/user_metrics.h" | 69 #include "content/public/browser/user_metrics.h" |
70 #include "net/base/net_errors.h" | 70 #include "net/base/net_errors.h" |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 BrowserThread::PostTask( | 946 BrowserThread::PostTask( |
947 BrowserThread::UI, FROM_HERE, | 947 BrowserThread::UI, FROM_HERE, |
948 base::Bind(&BrowsingDataRemover::ClearedPnaclCache, | 948 base::Bind(&BrowsingDataRemover::ClearedPnaclCache, |
949 base::Unretained(this))); | 949 base::Unretained(this))); |
950 } | 950 } |
951 | 951 |
952 void BrowsingDataRemover::ClearPnaclCacheOnIOThread(base::Time begin, | 952 void BrowsingDataRemover::ClearPnaclCacheOnIOThread(base::Time begin, |
953 base::Time end) { | 953 base::Time end) { |
954 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 954 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
955 | 955 |
956 PnaclHost::GetInstance()->ClearTranslationCacheEntriesBetween( | 956 pnacl::PnaclHost::GetInstance()->ClearTranslationCacheEntriesBetween( |
957 begin, end, | 957 begin, end, |
958 base::Bind(&BrowsingDataRemover::ClearedPnaclCacheOnIOThread, | 958 base::Bind(&BrowsingDataRemover::ClearedPnaclCacheOnIOThread, |
959 base::Unretained(this))); | 959 base::Unretained(this))); |
960 } | 960 } |
961 #endif | 961 #endif |
962 | 962 |
963 void BrowsingDataRemover::OnWaitableEventSignaled( | 963 void BrowsingDataRemover::OnWaitableEventSignaled( |
964 base::WaitableEvent* waitable_event) { | 964 base::WaitableEvent* waitable_event) { |
965 waiting_for_clear_plugin_data_ = false; | 965 waiting_for_clear_plugin_data_ = false; |
966 NotifyAndDeleteIfDone(); | 966 NotifyAndDeleteIfDone(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1057 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1058 waiting_for_clear_autofill_origin_urls_ = false; | 1058 waiting_for_clear_autofill_origin_urls_ = false; |
1059 NotifyAndDeleteIfDone(); | 1059 NotifyAndDeleteIfDone(); |
1060 } | 1060 } |
1061 | 1061 |
1062 void BrowsingDataRemover::OnClearedStoragePartitionData() { | 1062 void BrowsingDataRemover::OnClearedStoragePartitionData() { |
1063 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1063 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1064 waiting_for_clear_storage_partition_data_ = false; | 1064 waiting_for_clear_storage_partition_data_ = false; |
1065 NotifyAndDeleteIfDone(); | 1065 NotifyAndDeleteIfDone(); |
1066 } | 1066 } |
OLD | NEW |