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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 BrowserThread::PostTask( | 349 BrowserThread::PostTask( |
350 BrowserThread::IO, FROM_HERE, | 350 BrowserThread::IO, FROM_HERE, |
351 base::Bind(&BrowsingDataRemover::ClearServerBoundCertsOnIOThread, | 351 base::Bind(&BrowsingDataRemover::ClearServerBoundCertsOnIOThread, |
352 base::Unretained(this), base::Unretained(rq_context))); | 352 base::Unretained(this), base::Unretained(rq_context))); |
353 } | 353 } |
354 } | 354 } |
355 | 355 |
356 if (remove_mask & REMOVE_LOCAL_STORAGE) { | 356 if (remove_mask & REMOVE_LOCAL_STORAGE) { |
357 waiting_for_clear_local_storage_ = true; | 357 waiting_for_clear_local_storage_ = true; |
358 if (!dom_storage_context_) | 358 if (!dom_storage_context_) |
359 dom_storage_context_ = BrowserContext::GetDOMStorageContext(profile_); | 359 dom_storage_context_ = |
| 360 BrowserContext::GetDefaultDOMStorageContext(profile_); |
360 ClearLocalStorageOnUIThread(); | 361 ClearLocalStorageOnUIThread(); |
361 } | 362 } |
362 | 363 |
363 if (remove_mask & REMOVE_INDEXEDDB || remove_mask & REMOVE_WEBSQL || | 364 if (remove_mask & REMOVE_INDEXEDDB || remove_mask & REMOVE_WEBSQL || |
364 remove_mask & REMOVE_APPCACHE || remove_mask & REMOVE_FILE_SYSTEMS) { | 365 remove_mask & REMOVE_APPCACHE || remove_mask & REMOVE_FILE_SYSTEMS) { |
365 if (!quota_manager_) | 366 if (!quota_manager_) |
366 quota_manager_ = content::BrowserContext::GetQuotaManager(profile_); | 367 quota_manager_ = content::BrowserContext::GetQuotaManager(profile_); |
367 waiting_for_clear_quota_managed_data_ = true; | 368 waiting_for_clear_quota_managed_data_ = true; |
368 BrowserThread::PostTask( | 369 BrowserThread::PostTask( |
369 BrowserThread::IO, FROM_HERE, | 370 BrowserThread::IO, FROM_HERE, |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 BrowserThread::UI, FROM_HERE, | 876 BrowserThread::UI, FROM_HERE, |
876 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, | 877 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, |
877 base::Unretained(this))); | 878 base::Unretained(this))); |
878 } | 879 } |
879 | 880 |
880 void BrowsingDataRemover::OnClearedServerBoundCerts() { | 881 void BrowsingDataRemover::OnClearedServerBoundCerts() { |
881 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 882 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
882 waiting_for_clear_server_bound_certs_ = false; | 883 waiting_for_clear_server_bound_certs_ = false; |
883 NotifyAndDeleteIfDone(); | 884 NotifyAndDeleteIfDone(); |
884 } | 885 } |
OLD | NEW |