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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 if (prerender_manager) { | 881 if (prerender_manager) { |
882 prerender_manager->ClearData( | 882 prerender_manager->ClearData( |
883 prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS); | 883 prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS); |
884 } | 884 } |
885 | 885 |
886 // Tell the shader disk cache to clear. | 886 // Tell the shader disk cache to clear. |
887 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache")); | 887 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache")); |
888 storage_partition_remove_mask |= | 888 storage_partition_remove_mask |= |
889 content::StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE; | 889 content::StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE; |
890 | 890 |
891 storage_partition_remove_mask |= | |
892 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; | |
893 | |
894 // When clearing cache, wipe accumulated network related data | 891 // When clearing cache, wipe accumulated network related data |
895 // (TransportSecurityState and HttpServerPropertiesManager data). | 892 // (TransportSecurityState and HttpServerPropertiesManager data). |
896 waiting_for_clear_networking_history_ = true; | 893 waiting_for_clear_networking_history_ = true; |
897 profile_->ClearNetworkingHistorySince( | 894 profile_->ClearNetworkingHistorySince( |
898 delete_begin_, | 895 delete_begin_, |
899 base::Bind(&BrowsingDataRemover::OnClearedNetworkingHistory, | 896 base::Bind(&BrowsingDataRemover::OnClearedNetworkingHistory, |
900 weak_ptr_factory_.GetWeakPtr())); | 897 weak_ptr_factory_.GetWeakPtr())); |
901 } | 898 } |
902 | 899 |
903 if (remove_mask & REMOVE_WEBRTC_IDENTITY) { | |
904 storage_partition_remove_mask |= | |
905 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; | |
906 } | |
907 | |
908 if (storage_partition_remove_mask) { | 900 if (storage_partition_remove_mask) { |
909 waiting_for_clear_storage_partition_data_ = true; | 901 waiting_for_clear_storage_partition_data_ = true; |
910 | 902 |
911 content::StoragePartition* storage_partition; | 903 content::StoragePartition* storage_partition; |
912 if (storage_partition_for_testing_) | 904 if (storage_partition_for_testing_) |
913 storage_partition = storage_partition_for_testing_; | 905 storage_partition = storage_partition_for_testing_; |
914 else | 906 else |
915 storage_partition = BrowserContext::GetDefaultStoragePartition(profile_); | 907 storage_partition = BrowserContext::GetDefaultStoragePartition(profile_); |
916 | 908 |
917 uint32_t quota_storage_remove_mask = | 909 uint32_t quota_storage_remove_mask = |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 waiting_for_clear_domain_reliability_monitor_ = false; | 1328 waiting_for_clear_domain_reliability_monitor_ = false; |
1337 NotifyIfDone(); | 1329 NotifyIfDone(); |
1338 } | 1330 } |
1339 | 1331 |
1340 // static | 1332 // static |
1341 BrowsingDataRemover::CallbackSubscription | 1333 BrowsingDataRemover::CallbackSubscription |
1342 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1334 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
1343 const BrowsingDataRemover::Callback& callback) { | 1335 const BrowsingDataRemover::Callback& callback) { |
1344 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1336 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
1345 } | 1337 } |
OLD | NEW |