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 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 if (!dom_storage_context_) { | 377 if (!dom_storage_context_) { |
378 dom_storage_context_ = | 378 dom_storage_context_ = |
379 BrowserContext::GetDefaultStoragePartition(profile_)-> | 379 BrowserContext::GetDefaultStoragePartition(profile_)-> |
380 GetDOMStorageContext(); | 380 GetDOMStorageContext(); |
381 } | 381 } |
382 ClearLocalStorageOnUIThread(); | 382 ClearLocalStorageOnUIThread(); |
383 } | 383 } |
384 | 384 |
385 if (remove_mask & REMOVE_INDEXEDDB || remove_mask & REMOVE_WEBSQL || | 385 if (remove_mask & REMOVE_INDEXEDDB || remove_mask & REMOVE_WEBSQL || |
386 remove_mask & REMOVE_APPCACHE || remove_mask & REMOVE_FILE_SYSTEMS) { | 386 remove_mask & REMOVE_APPCACHE || remove_mask & REMOVE_FILE_SYSTEMS) { |
387 if (!quota_manager_) | 387 if (!quota_manager_) { |
388 quota_manager_ = content::BrowserContext::GetQuotaManager(profile_); | 388 quota_manager_ = |
| 389 BrowserContext::GetDefaultStoragePartition(profile_)-> |
| 390 GetQuotaManager(); |
| 391 } |
389 waiting_for_clear_quota_managed_data_ = true; | 392 waiting_for_clear_quota_managed_data_ = true; |
390 BrowserThread::PostTask( | 393 BrowserThread::PostTask( |
391 BrowserThread::IO, FROM_HERE, | 394 BrowserThread::IO, FROM_HERE, |
392 base::Bind(&BrowsingDataRemover::ClearQuotaManagedDataOnIOThread, | 395 base::Bind(&BrowsingDataRemover::ClearQuotaManagedDataOnIOThread, |
393 base::Unretained(this))); | 396 base::Unretained(this))); |
394 } | 397 } |
395 | 398 |
396 // Plugin is data not separated for protected and unprotected web origins. We | 399 // Plugin is data not separated for protected and unprotected web origins. We |
397 // check the origin_set_mask_ to prevent unintended deletion. | 400 // check the origin_set_mask_ to prevent unintended deletion. |
398 if (remove_mask & REMOVE_PLUGIN_DATA && | 401 if (remove_mask & REMOVE_PLUGIN_DATA && |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
898 BrowserThread::UI, FROM_HERE, | 901 BrowserThread::UI, FROM_HERE, |
899 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, | 902 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, |
900 base::Unretained(this))); | 903 base::Unretained(this))); |
901 } | 904 } |
902 | 905 |
903 void BrowsingDataRemover::OnClearedServerBoundCerts() { | 906 void BrowsingDataRemover::OnClearedServerBoundCerts() { |
904 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 907 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
905 waiting_for_clear_server_bound_certs_ = false; | 908 waiting_for_clear_server_bound_certs_ = false; |
906 NotifyAndDeleteIfDone(); | 909 NotifyAndDeleteIfDone(); |
907 } | 910 } |
OLD | NEW |