| 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 if (prerender_manager) { | 882 if (prerender_manager) { |
| 883 prerender_manager->ClearData( | 883 prerender_manager->ClearData( |
| 884 prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS); | 884 prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS); |
| 885 } | 885 } |
| 886 | 886 |
| 887 // Tell the shader disk cache to clear. | 887 // Tell the shader disk cache to clear. |
| 888 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache")); | 888 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache")); |
| 889 storage_partition_remove_mask |= | 889 storage_partition_remove_mask |= |
| 890 content::StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE; | 890 content::StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE; |
| 891 | 891 |
| 892 storage_partition_remove_mask |= | |
| 893 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; | |
| 894 | |
| 895 // When clearing cache, wipe accumulated network related data | 892 // When clearing cache, wipe accumulated network related data |
| 896 // (TransportSecurityState and HttpServerPropertiesManager data). | 893 // (TransportSecurityState and HttpServerPropertiesManager data). |
| 897 waiting_for_clear_networking_history_ = true; | 894 waiting_for_clear_networking_history_ = true; |
| 898 profile_->ClearNetworkingHistorySince( | 895 profile_->ClearNetworkingHistorySince( |
| 899 delete_begin_, | 896 delete_begin_, |
| 900 base::Bind(&BrowsingDataRemover::OnClearedNetworkingHistory, | 897 base::Bind(&BrowsingDataRemover::OnClearedNetworkingHistory, |
| 901 weak_ptr_factory_.GetWeakPtr())); | 898 weak_ptr_factory_.GetWeakPtr())); |
| 902 } | 899 } |
| 903 | 900 |
| 904 if (remove_mask & REMOVE_WEBRTC_IDENTITY) { | |
| 905 storage_partition_remove_mask |= | |
| 906 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; | |
| 907 } | |
| 908 | |
| 909 // Content Decryption Modules used by Encrypted Media store licenses in a | 901 // Content Decryption Modules used by Encrypted Media store licenses in a |
| 910 // private filesystem. These are different than content licenses used by | 902 // private filesystem. These are different than content licenses used by |
| 911 // Flash (which are deleted father down in this method). | 903 // Flash (which are deleted father down in this method). |
| 912 if (remove_mask & REMOVE_MEDIA_LICENSES) { | 904 if (remove_mask & REMOVE_MEDIA_LICENSES) { |
| 913 storage_partition_remove_mask |= | 905 storage_partition_remove_mask |= |
| 914 content::StoragePartition::REMOVE_DATA_MASK_PLUGIN_PRIVATE_DATA; | 906 content::StoragePartition::REMOVE_DATA_MASK_PLUGIN_PRIVATE_DATA; |
| 915 } | 907 } |
| 916 | 908 |
| 917 if (storage_partition_remove_mask) { | 909 if (storage_partition_remove_mask) { |
| 918 waiting_for_clear_storage_partition_data_ = true; | 910 waiting_for_clear_storage_partition_data_ = true; |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1348 waiting_for_clear_domain_reliability_monitor_ = false; | 1340 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1349 NotifyIfDone(); | 1341 NotifyIfDone(); |
| 1350 } | 1342 } |
| 1351 | 1343 |
| 1352 // static | 1344 // static |
| 1353 BrowsingDataRemover::CallbackSubscription | 1345 BrowsingDataRemover::CallbackSubscription |
| 1354 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1346 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
| 1355 const BrowsingDataRemover::Callback& callback) { | 1347 const BrowsingDataRemover::Callback& callback) { |
| 1356 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1348 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
| 1357 } | 1349 } |
| OLD | NEW |