| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "content/public/browser/user_metrics.h" | 52 #include "content/public/browser/user_metrics.h" |
| 53 #include "net/base/net_errors.h" | 53 #include "net/base/net_errors.h" |
| 54 #include "net/base/server_bound_cert_service.h" | 54 #include "net/base/server_bound_cert_service.h" |
| 55 #include "net/base/server_bound_cert_store.h" | 55 #include "net/base/server_bound_cert_store.h" |
| 56 #include "net/base/transport_security_state.h" | 56 #include "net/base/transport_security_state.h" |
| 57 #include "net/cookies/cookie_store.h" | 57 #include "net/cookies/cookie_store.h" |
| 58 #include "net/disk_cache/disk_cache.h" | 58 #include "net/disk_cache/disk_cache.h" |
| 59 #include "net/http/http_cache.h" | 59 #include "net/http/http_cache.h" |
| 60 #include "net/url_request/url_request_context.h" | 60 #include "net/url_request/url_request_context.h" |
| 61 #include "net/url_request/url_request_context_getter.h" | 61 #include "net/url_request/url_request_context_getter.h" |
| 62 #include "webkit/dom_storage/dom_storage_context.h" |
| 62 #include "webkit/quota/quota_manager.h" | 63 #include "webkit/quota/quota_manager.h" |
| 63 #include "webkit/quota/quota_types.h" | 64 #include "webkit/quota/quota_types.h" |
| 65 #include "webkit/quota/special_storage_policy.h" |
| 64 | 66 |
| 65 using content::BrowserContext; | 67 using content::BrowserContext; |
| 66 using content::BrowserThread; | 68 using content::BrowserThread; |
| 67 using content::DOMStorageContext; | 69 using content::DOMStorageContext; |
| 68 using content::DownloadManager; | 70 using content::DownloadManager; |
| 69 using content::UserMetricsAction; | 71 using content::UserMetricsAction; |
| 70 | 72 |
| 71 bool BrowsingDataRemover::removing_ = false; | 73 bool BrowsingDataRemover::removing_ = false; |
| 72 | 74 |
| 73 BrowsingDataRemover::NotificationDetails::NotificationDetails() | 75 BrowsingDataRemover::NotificationDetails::NotificationDetails() |
| 74 : removal_begin(base::Time()), | 76 : removal_begin(base::Time()), |
| 75 removal_mask(-1) { | 77 removal_mask(-1) { |
| 76 } | 78 } |
| 77 | 79 |
| 78 BrowsingDataRemover::NotificationDetails::NotificationDetails( | 80 BrowsingDataRemover::NotificationDetails::NotificationDetails( |
| 79 const BrowsingDataRemover::NotificationDetails& details) | 81 const BrowsingDataRemover::NotificationDetails& details) |
| 80 : removal_begin(details.removal_begin), | 82 : removal_begin(details.removal_begin), |
| 81 removal_mask(details.removal_mask) { | 83 removal_mask(details.removal_mask) { |
| 82 } | 84 } |
| 83 | 85 |
| 84 BrowsingDataRemover::NotificationDetails::NotificationDetails( | 86 BrowsingDataRemover::NotificationDetails::NotificationDetails( |
| 85 base::Time removal_begin, | 87 base::Time removal_begin, |
| 86 int removal_mask) | 88 int removal_mask) |
| 87 : removal_begin(removal_begin), | 89 : removal_begin(removal_begin), |
| 88 removal_mask(removal_mask) { | 90 removal_mask(removal_mask) { |
| 89 } | 91 } |
| 90 | 92 |
| 91 BrowsingDataRemover::NotificationDetails::~NotificationDetails() {} | 93 BrowsingDataRemover::NotificationDetails::~NotificationDetails() {} |
| 92 | 94 |
| 95 // TODO(mkwst): We should have one constructor, not two. http://crbug.com/130732 |
| 93 BrowsingDataRemover::BrowsingDataRemover(Profile* profile, | 96 BrowsingDataRemover::BrowsingDataRemover(Profile* profile, |
| 94 base::Time delete_begin, | 97 base::Time delete_begin, |
| 95 base::Time delete_end) | 98 base::Time delete_end) |
| 96 : profile_(profile), | 99 : profile_(profile), |
| 97 quota_manager_(NULL), | 100 quota_manager_(NULL), |
| 101 dom_storage_context_(NULL), |
| 98 special_storage_policy_(profile->GetExtensionSpecialStoragePolicy()), | 102 special_storage_policy_(profile->GetExtensionSpecialStoragePolicy()), |
| 99 delete_begin_(delete_begin), | 103 delete_begin_(delete_begin), |
| 100 delete_end_(delete_end), | 104 delete_end_(delete_end), |
| 101 next_cache_state_(STATE_NONE), | 105 next_cache_state_(STATE_NONE), |
| 102 cache_(NULL), | 106 cache_(NULL), |
| 103 main_context_getter_(profile->GetRequestContext()), | 107 main_context_getter_(profile->GetRequestContext()), |
| 104 media_context_getter_(profile->GetRequestContextForMedia()), | 108 media_context_getter_(profile->GetRequestContextForMedia()), |
| 105 deauthorize_content_licenses_request_id_(0), | 109 deauthorize_content_licenses_request_id_(0), |
| 106 waiting_for_clear_cache_(false), | 110 waiting_for_clear_cache_(false), |
| 107 waiting_for_clear_cookies_count_(0), | 111 waiting_for_clear_cookies_count_(0), |
| 108 waiting_for_clear_history_(false), | 112 waiting_for_clear_history_(false), |
| 113 waiting_for_clear_local_storage_(false), |
| 109 waiting_for_clear_networking_history_(false), | 114 waiting_for_clear_networking_history_(false), |
| 110 waiting_for_clear_server_bound_certs_(false), | 115 waiting_for_clear_server_bound_certs_(false), |
| 111 waiting_for_clear_plugin_data_(false), | 116 waiting_for_clear_plugin_data_(false), |
| 112 waiting_for_clear_quota_managed_data_(false), | 117 waiting_for_clear_quota_managed_data_(false), |
| 113 waiting_for_clear_content_licenses_(false), | 118 waiting_for_clear_content_licenses_(false), |
| 114 remove_mask_(0), | 119 remove_mask_(0), |
| 115 remove_origin_(GURL()), | 120 remove_origin_(GURL()), |
| 116 remove_protected_(false) { | 121 origin_set_mask_(0) { |
| 117 DCHECK(profile); | 122 DCHECK(profile); |
| 118 } | 123 } |
| 119 | 124 |
| 120 BrowsingDataRemover::BrowsingDataRemover(Profile* profile, | 125 BrowsingDataRemover::BrowsingDataRemover(Profile* profile, |
| 121 TimePeriod time_period, | 126 TimePeriod time_period, |
| 122 base::Time delete_end) | 127 base::Time delete_end) |
| 123 : profile_(profile), | 128 : profile_(profile), |
| 124 quota_manager_(NULL), | 129 quota_manager_(NULL), |
| 130 dom_storage_context_(NULL), |
| 125 special_storage_policy_(profile->GetExtensionSpecialStoragePolicy()), | 131 special_storage_policy_(profile->GetExtensionSpecialStoragePolicy()), |
| 126 delete_begin_(CalculateBeginDeleteTime(time_period)), | 132 delete_begin_(CalculateBeginDeleteTime(time_period)), |
| 127 delete_end_(delete_end), | 133 delete_end_(delete_end), |
| 128 next_cache_state_(STATE_NONE), | 134 next_cache_state_(STATE_NONE), |
| 129 cache_(NULL), | 135 cache_(NULL), |
| 130 main_context_getter_(profile->GetRequestContext()), | 136 main_context_getter_(profile->GetRequestContext()), |
| 131 media_context_getter_(profile->GetRequestContextForMedia()), | 137 media_context_getter_(profile->GetRequestContextForMedia()), |
| 132 deauthorize_content_licenses_request_id_(0), | 138 deauthorize_content_licenses_request_id_(0), |
| 133 waiting_for_clear_cache_(false), | 139 waiting_for_clear_cache_(false), |
| 134 waiting_for_clear_cookies_count_(0), | 140 waiting_for_clear_cookies_count_(0), |
| 135 waiting_for_clear_history_(false), | 141 waiting_for_clear_history_(false), |
| 142 waiting_for_clear_local_storage_(false), |
| 136 waiting_for_clear_networking_history_(false), | 143 waiting_for_clear_networking_history_(false), |
| 137 waiting_for_clear_server_bound_certs_(false), | 144 waiting_for_clear_server_bound_certs_(false), |
| 138 waiting_for_clear_plugin_data_(false), | 145 waiting_for_clear_plugin_data_(false), |
| 139 waiting_for_clear_quota_managed_data_(false), | 146 waiting_for_clear_quota_managed_data_(false), |
| 140 waiting_for_clear_content_licenses_(false), | 147 waiting_for_clear_content_licenses_(false), |
| 141 remove_mask_(0), | 148 remove_mask_(0), |
| 142 remove_origin_(GURL()), | 149 remove_origin_(GURL()), |
| 143 remove_protected_(false) { | 150 origin_set_mask_(0) { |
| 144 DCHECK(profile); | 151 DCHECK(profile); |
| 145 } | 152 } |
| 146 | 153 |
| 147 BrowsingDataRemover::~BrowsingDataRemover() { | 154 BrowsingDataRemover::~BrowsingDataRemover() { |
| 148 DCHECK(all_done()); | 155 DCHECK(all_done()); |
| 149 } | 156 } |
| 150 | 157 |
| 151 // Static. | 158 // Static. |
| 152 void BrowsingDataRemover::set_removing(bool removing) { | 159 void BrowsingDataRemover::set_removing(bool removing) { |
| 153 DCHECK(removing_ != removing); | 160 DCHECK(removing_ != removing); |
| 154 removing_ = removing; | 161 removing_ = removing; |
| 155 } | 162 } |
| 156 | 163 |
| 157 // Static. | 164 // Static. |
| 158 int BrowsingDataRemover::GenerateQuotaClientMask(int remove_mask) { | 165 int BrowsingDataRemover::GenerateQuotaClientMask(int remove_mask) { |
| 159 int quota_client_mask = 0; | 166 int quota_client_mask = 0; |
| 160 if (remove_mask & BrowsingDataRemover::REMOVE_FILE_SYSTEMS) | 167 if (remove_mask & BrowsingDataRemover::REMOVE_FILE_SYSTEMS) |
| 161 quota_client_mask |= quota::QuotaClient::kFileSystem; | 168 quota_client_mask |= quota::QuotaClient::kFileSystem; |
| 162 if (remove_mask & BrowsingDataRemover::REMOVE_WEBSQL) | 169 if (remove_mask & BrowsingDataRemover::REMOVE_WEBSQL) |
| 163 quota_client_mask |= quota::QuotaClient::kDatabase; | 170 quota_client_mask |= quota::QuotaClient::kDatabase; |
| 164 if (remove_mask & BrowsingDataRemover::REMOVE_APPCACHE) | 171 if (remove_mask & BrowsingDataRemover::REMOVE_APPCACHE) |
| 165 quota_client_mask |= quota::QuotaClient::kAppcache; | 172 quota_client_mask |= quota::QuotaClient::kAppcache; |
| 166 if (remove_mask & BrowsingDataRemover::REMOVE_INDEXEDDB) | 173 if (remove_mask & BrowsingDataRemover::REMOVE_INDEXEDDB) |
| 167 quota_client_mask |= quota::QuotaClient::kIndexedDatabase; | 174 quota_client_mask |= quota::QuotaClient::kIndexedDatabase; |
| 168 | 175 |
| 169 return quota_client_mask; | 176 return quota_client_mask; |
| 170 } | 177 } |
| 171 | 178 |
| 172 void BrowsingDataRemover::Remove(int remove_mask) { | 179 void BrowsingDataRemover::Remove(int remove_mask, int origin_set_mask) { |
| 173 RemoveImpl(remove_mask, GURL(), false); | 180 RemoveImpl(remove_mask, GURL(), origin_set_mask); |
| 174 } | 181 } |
| 175 | 182 |
| 176 void BrowsingDataRemover::RemoveImpl(int remove_mask, | 183 void BrowsingDataRemover::RemoveImpl(int remove_mask, |
| 177 const GURL& origin, | 184 const GURL& origin, |
| 178 bool remove_protected_origins) { | 185 int origin_set_mask) { |
| 179 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 186 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 180 set_removing(true); | 187 set_removing(true); |
| 181 remove_mask_ = remove_mask; | 188 remove_mask_ = remove_mask; |
| 182 remove_origin_ = origin; | 189 remove_origin_ = origin; |
| 183 remove_protected_ = remove_protected_origins; | 190 origin_set_mask_ = origin_set_mask; |
| 184 | 191 |
| 185 if (remove_mask & REMOVE_HISTORY) { | 192 if (remove_mask & REMOVE_HISTORY) { |
| 186 HistoryService* history_service = | 193 HistoryService* history_service = |
| 187 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); | 194 profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); |
| 188 if (history_service) { | 195 if (history_service) { |
| 189 std::set<GURL> restrict_urls; | 196 std::set<GURL> restrict_urls; |
| 190 if (!remove_origin_.is_empty()) | 197 if (!remove_origin_.is_empty()) |
| 191 restrict_urls.insert(remove_origin_); | 198 restrict_urls.insert(remove_origin_); |
| 192 content::RecordAction(UserMetricsAction("ClearBrowsingData_History")); | 199 content::RecordAction(UserMetricsAction("ClearBrowsingData_History")); |
| 193 waiting_for_clear_history_ = true; | 200 waiting_for_clear_history_ = true; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 if (rq_context) { | 311 if (rq_context) { |
| 305 waiting_for_clear_server_bound_certs_ = true; | 312 waiting_for_clear_server_bound_certs_ = true; |
| 306 BrowserThread::PostTask( | 313 BrowserThread::PostTask( |
| 307 BrowserThread::IO, FROM_HERE, | 314 BrowserThread::IO, FROM_HERE, |
| 308 base::Bind(&BrowsingDataRemover::ClearServerBoundCertsOnIOThread, | 315 base::Bind(&BrowsingDataRemover::ClearServerBoundCertsOnIOThread, |
| 309 base::Unretained(this), base::Unretained(rq_context))); | 316 base::Unretained(this), base::Unretained(rq_context))); |
| 310 } | 317 } |
| 311 } | 318 } |
| 312 | 319 |
| 313 if (remove_mask & REMOVE_LOCAL_STORAGE) { | 320 if (remove_mask & REMOVE_LOCAL_STORAGE) { |
| 314 BrowserContext::GetDOMStorageContext(profile_)->DeleteDataModifiedSince( | 321 waiting_for_clear_local_storage_ = true; |
| 315 delete_begin_); | 322 if (!dom_storage_context_) |
| 323 dom_storage_context_ = BrowserContext::GetDOMStorageContext(profile_); |
| 324 ClearLocalStorageOnUIThread(); |
| 316 } | 325 } |
| 317 | 326 |
| 318 if (remove_mask & REMOVE_INDEXEDDB || remove_mask & REMOVE_WEBSQL || | 327 if (remove_mask & REMOVE_INDEXEDDB || remove_mask & REMOVE_WEBSQL || |
| 319 remove_mask & REMOVE_APPCACHE || remove_mask & REMOVE_FILE_SYSTEMS) { | 328 remove_mask & REMOVE_APPCACHE || remove_mask & REMOVE_FILE_SYSTEMS) { |
| 320 if (!quota_manager_) | 329 if (!quota_manager_) |
| 321 quota_manager_ = content::BrowserContext::GetQuotaManager(profile_); | 330 quota_manager_ = content::BrowserContext::GetQuotaManager(profile_); |
| 322 waiting_for_clear_quota_managed_data_ = true; | 331 waiting_for_clear_quota_managed_data_ = true; |
| 323 BrowserThread::PostTask( | 332 BrowserThread::PostTask( |
| 324 BrowserThread::IO, FROM_HERE, | 333 BrowserThread::IO, FROM_HERE, |
| 325 base::Bind(&BrowsingDataRemover::ClearQuotaManagedDataOnIOThread, | 334 base::Bind(&BrowsingDataRemover::ClearQuotaManagedDataOnIOThread, |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 } | 598 } |
| 590 default: { | 599 default: { |
| 591 NOTREACHED() << "bad state"; | 600 NOTREACHED() << "bad state"; |
| 592 next_cache_state_ = STATE_NONE; // Stop looping. | 601 next_cache_state_ = STATE_NONE; // Stop looping. |
| 593 break; | 602 break; |
| 594 } | 603 } |
| 595 } | 604 } |
| 596 } | 605 } |
| 597 } | 606 } |
| 598 | 607 |
| 608 void BrowsingDataRemover::ClearLocalStorageOnUIThread() { |
| 609 DCHECK(waiting_for_clear_local_storage_); |
| 610 |
| 611 dom_storage_context_->GetUsageInfo( |
| 612 base::Bind(&BrowsingDataRemover::OnGotLocalStorageUsageInfo, |
| 613 base::Unretained(this))); |
| 614 } |
| 615 |
| 616 void BrowsingDataRemover::OnGotLocalStorageUsageInfo( |
| 617 const std::vector<dom_storage::DomStorageContext::UsageInfo>& infos) { |
| 618 DCHECK(waiting_for_clear_local_storage_); |
| 619 |
| 620 for (size_t i = 0; i < infos.size(); ++i) { |
| 621 if (!BrowsingDataHelper::DoesOriginMatchMask(infos[i].origin, |
| 622 origin_set_mask_, |
| 623 special_storage_policy_)) |
| 624 continue; |
| 625 |
| 626 if (infos[i].last_modified >= delete_begin_ && |
| 627 infos[i].last_modified <= delete_end_) |
| 628 dom_storage_context_->DeleteOrigin(infos[i].origin); |
| 629 } |
| 630 BrowserThread::PostTask( |
| 631 BrowserThread::UI, FROM_HERE, |
| 632 base::Bind(&BrowsingDataRemover::OnLocalStorageCleared, |
| 633 base::Unretained(this))); |
| 634 } |
| 635 |
| 636 void BrowsingDataRemover::OnLocalStorageCleared() { |
| 637 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 638 DCHECK(waiting_for_clear_local_storage_); |
| 639 waiting_for_clear_local_storage_ = false; |
| 640 NotifyAndDeleteIfDone(); |
| 641 } |
| 642 |
| 599 void BrowsingDataRemover::ClearQuotaManagedDataOnIOThread() { | 643 void BrowsingDataRemover::ClearQuotaManagedDataOnIOThread() { |
| 600 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 644 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 601 | 645 |
| 602 // Ask the QuotaManager for all origins with temporary quota modified within | 646 // Ask the QuotaManager for all origins with temporary quota modified within |
| 603 // the user-specified timeframe, and deal with the resulting set in | 647 // the user-specified timeframe, and deal with the resulting set in |
| 604 // OnGotQuotaManagedOrigins(). | 648 // OnGotQuotaManagedOrigins(). |
| 605 quota_managed_origins_to_delete_count_ = 0; | 649 quota_managed_origins_to_delete_count_ = 0; |
| 606 quota_managed_storage_types_to_delete_count_ = 2; | 650 quota_managed_storage_types_to_delete_count_ = 0; |
| 607 | 651 |
| 608 if (delete_begin_ == base::Time()) { | 652 if (delete_begin_ == base::Time() || |
| 609 // If we're deleting since the beginning of time, ask the QuotaManager for | 653 origin_set_mask_ & |
| 610 // all origins with persistent quota modified within the user-specified | 654 (BrowsingDataHelper::PROTECTED_WEB | BrowsingDataHelper::EXTENSION)) { |
| 611 // timeframe, and deal with the resulting set in | 655 // If we're deleting since the beginning of time, or we're removing |
| 612 // OnGotPersistentQuotaManagedOrigins. | 656 // protected origins, then ask the QuotaManager for all origins with |
| 657 // persistent quota modified within the user-specified timeframe, and deal |
| 658 // with the resulting set in OnGotQuotaManagedOrigins. |
| 659 ++quota_managed_storage_types_to_delete_count_; |
| 613 quota_manager_->GetOriginsModifiedSince( | 660 quota_manager_->GetOriginsModifiedSince( |
| 614 quota::kStorageTypePersistent, delete_begin_, | 661 quota::kStorageTypePersistent, delete_begin_, |
| 615 base::Bind(&BrowsingDataRemover::OnGotQuotaManagedOrigins, | 662 base::Bind(&BrowsingDataRemover::OnGotQuotaManagedOrigins, |
| 616 base::Unretained(this))); | 663 base::Unretained(this))); |
| 617 } else { | |
| 618 // Otherwise, we don't need to deal with persistent storage. | |
| 619 --quota_managed_storage_types_to_delete_count_; | |
| 620 } | 664 } |
| 621 | 665 |
| 622 // Do the same for temporary quota, regardless, passing the resulting set into | 666 // Do the same for temporary quota. |
| 623 // OnGotTemporaryQuotaManagedOrigins. | 667 ++quota_managed_storage_types_to_delete_count_; |
| 624 quota_manager_->GetOriginsModifiedSince( | 668 quota_manager_->GetOriginsModifiedSince( |
| 625 quota::kStorageTypeTemporary, delete_begin_, | 669 quota::kStorageTypeTemporary, delete_begin_, |
| 626 base::Bind(&BrowsingDataRemover::OnGotQuotaManagedOrigins, | 670 base::Bind(&BrowsingDataRemover::OnGotQuotaManagedOrigins, |
| 627 base::Unretained(this))); | 671 base::Unretained(this))); |
| 628 } | 672 } |
| 629 | 673 |
| 630 void BrowsingDataRemover::OnGotQuotaManagedOrigins( | 674 void BrowsingDataRemover::OnGotQuotaManagedOrigins( |
| 631 const std::set<GURL>& origins, quota::StorageType type) { | 675 const std::set<GURL>& origins, quota::StorageType type) { |
| 632 DCHECK_GT(quota_managed_storage_types_to_delete_count_, 0); | 676 DCHECK_GT(quota_managed_storage_types_to_delete_count_, 0); |
| 633 // Walk through the origins passed in, delete quota of |type| from each that | 677 // Walk through the origins passed in, delete quota of |type| from each that |
| 634 // isn't protected. | 678 // matches the |origin_set_mask_|. |
| 635 std::set<GURL>::const_iterator origin; | 679 std::set<GURL>::const_iterator origin; |
| 636 for (origin = origins.begin(); origin != origins.end(); ++origin) { | 680 for (origin = origins.begin(); origin != origins.end(); ++origin) { |
| 637 if (!BrowsingDataHelper::IsWebScheme(origin->scheme())) | 681 // TODO(mkwst): Clean this up, it's slow. http://crbug.com/130746 |
| 638 continue; | |
| 639 if (special_storage_policy_->IsStorageProtected(origin->GetOrigin())) | |
| 640 continue; | |
| 641 if (!remove_origin_.is_empty() && remove_origin_ != origin->GetOrigin()) | 682 if (!remove_origin_.is_empty() && remove_origin_ != origin->GetOrigin()) |
| 642 continue; | 683 continue; |
| 684 |
| 685 if (!BrowsingDataHelper::DoesOriginMatchMask(origin->GetOrigin(), |
| 686 origin_set_mask_, |
| 687 special_storage_policy_)) |
| 688 continue; |
| 689 |
| 643 ++quota_managed_origins_to_delete_count_; | 690 ++quota_managed_origins_to_delete_count_; |
| 644 quota_manager_->DeleteOriginData( | 691 quota_manager_->DeleteOriginData( |
| 645 origin->GetOrigin(), type, | 692 origin->GetOrigin(), type, |
| 646 BrowsingDataRemover::GenerateQuotaClientMask(remove_mask_), | 693 BrowsingDataRemover::GenerateQuotaClientMask(remove_mask_), |
| 647 base::Bind(&BrowsingDataRemover::OnQuotaManagedOriginDeletion, | 694 base::Bind(&BrowsingDataRemover::OnQuotaManagedOriginDeletion, |
| 648 base::Unretained(this))); | 695 base::Unretained(this))); |
| 649 } | 696 } |
| 650 | 697 |
| 651 --quota_managed_storage_types_to_delete_count_; | 698 --quota_managed_storage_types_to_delete_count_; |
| 652 CheckQuotaManagedDataDeletionStatus(); | 699 CheckQuotaManagedDataDeletionStatus(); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 BrowserThread::UI, FROM_HERE, | 782 BrowserThread::UI, FROM_HERE, |
| 736 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, | 783 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, |
| 737 base::Unretained(this))); | 784 base::Unretained(this))); |
| 738 } | 785 } |
| 739 | 786 |
| 740 void BrowsingDataRemover::OnClearedServerBoundCerts() { | 787 void BrowsingDataRemover::OnClearedServerBoundCerts() { |
| 741 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 788 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 742 waiting_for_clear_server_bound_certs_ = false; | 789 waiting_for_clear_server_bound_certs_ = false; |
| 743 NotifyAndDeleteIfDone(); | 790 NotifyAndDeleteIfDone(); |
| 744 } | 791 } |
| OLD | NEW |