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. |
651 EphemeralAppService::Get(profile_)->ClearCachedApps(); | 651 if (EphemeralAppService::Get(profile_)) |
Peter Kasting
2015/02/10 21:43:36
Get() is named as if it's expensive, implying we s
Mike Lerman
2015/02/10 21:53:32
It's a BrowserContextKeyedService, which follows t
Peter Kasting
2015/02/10 21:58:10
Did you mean to say, it's NOT an expensive transac
Mike Lerman
2015/02/11 15:15:32
I did mean to say in-expensive. Serves me right fo
| |
652 EphemeralAppService::Get(profile_)->ClearCachedApps(); | |
652 #endif | 653 #endif |
653 } | 654 } |
654 | 655 |
655 if (storage_partition_remove_mask) { | 656 if (storage_partition_remove_mask) { |
656 waiting_for_clear_storage_partition_data_ = true; | 657 waiting_for_clear_storage_partition_data_ = true; |
657 | 658 |
658 content::StoragePartition* storage_partition; | 659 content::StoragePartition* storage_partition; |
659 if (storage_partition_for_testing_) | 660 if (storage_partition_for_testing_) |
660 storage_partition = storage_partition_for_testing_; | 661 storage_partition = storage_partition_for_testing_; |
661 else | 662 else |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1220 waiting_for_clear_domain_reliability_monitor_ = false; | 1221 waiting_for_clear_domain_reliability_monitor_ = false; |
1221 NotifyAndDeleteIfDone(); | 1222 NotifyAndDeleteIfDone(); |
1222 } | 1223 } |
1223 | 1224 |
1224 // static | 1225 // static |
1225 BrowsingDataRemover::CallbackSubscription | 1226 BrowsingDataRemover::CallbackSubscription |
1226 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1227 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
1227 const BrowsingDataRemover::Callback& callback) { | 1228 const BrowsingDataRemover::Callback& callback) { |
1228 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1229 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
1229 } | 1230 } |
OLD | NEW |