| 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_remover.h" | 5 #include "chrome/browser/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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 base::Unretained(this))); | 627 base::Unretained(this))); |
| 628 } | 628 } |
| 629 | 629 |
| 630 void BrowsingDataRemover::OnGotQuotaManagedOrigins( | 630 void BrowsingDataRemover::OnGotQuotaManagedOrigins( |
| 631 const std::set<GURL>& origins, quota::StorageType type) { | 631 const std::set<GURL>& origins, quota::StorageType type) { |
| 632 DCHECK_GT(quota_managed_storage_types_to_delete_count_, 0); | 632 DCHECK_GT(quota_managed_storage_types_to_delete_count_, 0); |
| 633 // Walk through the origins passed in, delete quota of |type| from each that | 633 // Walk through the origins passed in, delete quota of |type| from each that |
| 634 // isn't protected. | 634 // isn't protected. |
| 635 std::set<GURL>::const_iterator origin; | 635 std::set<GURL>::const_iterator origin; |
| 636 for (origin = origins.begin(); origin != origins.end(); ++origin) { | 636 for (origin = origins.begin(); origin != origins.end(); ++origin) { |
| 637 if (!BrowsingDataHelper::IsValidScheme(origin->scheme())) | 637 if (!BrowsingDataHelper::IsWebScheme(origin->scheme())) |
| 638 continue; | 638 continue; |
| 639 if (special_storage_policy_->IsStorageProtected(origin->GetOrigin())) | 639 if (special_storage_policy_->IsStorageProtected(origin->GetOrigin())) |
| 640 continue; | 640 continue; |
| 641 if (!remove_origin_.is_empty() && remove_origin_ != origin->GetOrigin()) | 641 if (!remove_origin_.is_empty() && remove_origin_ != origin->GetOrigin()) |
| 642 continue; | 642 continue; |
| 643 ++quota_managed_origins_to_delete_count_; | 643 ++quota_managed_origins_to_delete_count_; |
| 644 quota_manager_->DeleteOriginData( | 644 quota_manager_->DeleteOriginData( |
| 645 origin->GetOrigin(), type, | 645 origin->GetOrigin(), type, |
| 646 BrowsingDataRemover::GenerateQuotaClientMask(remove_mask_), | 646 BrowsingDataRemover::GenerateQuotaClientMask(remove_mask_), |
| 647 base::Bind(&BrowsingDataRemover::OnQuotaManagedOriginDeletion, | 647 base::Bind(&BrowsingDataRemover::OnQuotaManagedOriginDeletion, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 BrowserThread::UI, FROM_HERE, | 735 BrowserThread::UI, FROM_HERE, |
| 736 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, | 736 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, |
| 737 base::Unretained(this))); | 737 base::Unretained(this))); |
| 738 } | 738 } |
| 739 | 739 |
| 740 void BrowsingDataRemover::OnClearedServerBoundCerts() { | 740 void BrowsingDataRemover::OnClearedServerBoundCerts() { |
| 741 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 741 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 742 waiting_for_clear_server_bound_certs_ = false; | 742 waiting_for_clear_server_bound_certs_ = false; |
| 743 NotifyAndDeleteIfDone(); | 743 NotifyAndDeleteIfDone(); |
| 744 } | 744 } |
| OLD | NEW |