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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 640 |
641 // Tell the shader disk cache to clear. | 641 // Tell the shader disk cache to clear. |
642 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache")); | 642 content::RecordAction(UserMetricsAction("ClearBrowsingData_ShaderCache")); |
643 storage_partition_remove_mask |= | 643 storage_partition_remove_mask |= |
644 content::StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE; | 644 content::StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE; |
645 | 645 |
646 storage_partition_remove_mask |= | 646 storage_partition_remove_mask |= |
647 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; | 647 content::StoragePartition::REMOVE_DATA_MASK_WEBRTC_IDENTITY; |
648 | 648 |
649 #if defined(ENABLE_EXTENSIONS) | 649 #if defined(ENABLE_EXTENSIONS) |
650 // Clear the ephemeral apps cache. | 650 // Clear the ephemeral apps cache. This is NULL while testing. OTR Profile |
651 EphemeralAppService::Get(profile_)->ClearCachedApps(); | 651 // has neither apps nor an ExtensionService, so ClearCachedApps fails. |
| 652 EphemeralAppService* ephemeral_app_service = |
| 653 EphemeralAppService::Get(profile_); |
| 654 if (ephemeral_app_service && !profile_->IsOffTheRecord()) |
| 655 ephemeral_app_service->ClearCachedApps(); |
652 #endif | 656 #endif |
653 } | 657 } |
654 | 658 |
655 if (storage_partition_remove_mask) { | 659 if (storage_partition_remove_mask) { |
656 waiting_for_clear_storage_partition_data_ = true; | 660 waiting_for_clear_storage_partition_data_ = true; |
657 | 661 |
658 content::StoragePartition* storage_partition; | 662 content::StoragePartition* storage_partition; |
659 if (storage_partition_for_testing_) | 663 if (storage_partition_for_testing_) |
660 storage_partition = storage_partition_for_testing_; | 664 storage_partition = storage_partition_for_testing_; |
661 else | 665 else |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 waiting_for_clear_domain_reliability_monitor_ = false; | 1224 waiting_for_clear_domain_reliability_monitor_ = false; |
1221 NotifyAndDeleteIfDone(); | 1225 NotifyAndDeleteIfDone(); |
1222 } | 1226 } |
1223 | 1227 |
1224 // static | 1228 // static |
1225 BrowsingDataRemover::CallbackSubscription | 1229 BrowsingDataRemover::CallbackSubscription |
1226 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1230 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
1227 const BrowsingDataRemover::Callback& callback) { | 1231 const BrowsingDataRemover::Callback& callback) { |
1228 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1232 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
1229 } | 1233 } |
OLD | NEW |