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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 BrowserThread::PostTask( | 318 BrowserThread::PostTask( |
319 BrowserThread::IO, FROM_HERE, | 319 BrowserThread::IO, FROM_HERE, |
320 base::Bind(&BrowsingDataRemover::ClearQuotaManagedDataOnIOThread, | 320 base::Bind(&BrowsingDataRemover::ClearQuotaManagedDataOnIOThread, |
321 base::Unretained(this))); | 321 base::Unretained(this))); |
322 } | 322 } |
323 | 323 |
324 if (remove_mask & REMOVE_PLUGIN_DATA) { | 324 if (remove_mask & REMOVE_PLUGIN_DATA) { |
325 content::RecordAction(UserMetricsAction("ClearBrowsingData_LSOData")); | 325 content::RecordAction(UserMetricsAction("ClearBrowsingData_LSOData")); |
326 | 326 |
327 waiting_for_clear_plugin_data_ = true; | 327 waiting_for_clear_plugin_data_ = true; |
328 if (!plugin_data_remover_.get()) { | 328 if (!plugin_data_remover_.get()) |
329 plugin_data_remover_.reset( | 329 plugin_data_remover_.reset(content::PluginDataRemover::Create(profile_)); |
330 content::PluginDataRemover::Create(profile_->GetResourceContext())); | |
331 } | |
332 base::WaitableEvent* event = | 330 base::WaitableEvent* event = |
333 plugin_data_remover_->StartRemoving(delete_begin_); | 331 plugin_data_remover_->StartRemoving(delete_begin_); |
334 watcher_.StartWatching(event, this); | 332 watcher_.StartWatching(event, this); |
335 } | 333 } |
336 | 334 |
337 if (remove_mask & REMOVE_PASSWORDS) { | 335 if (remove_mask & REMOVE_PASSWORDS) { |
338 content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords")); | 336 content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords")); |
339 PasswordStore* password_store = PasswordStoreFactory::GetForProfile( | 337 PasswordStore* password_store = PasswordStoreFactory::GetForProfile( |
340 profile_, Profile::EXPLICIT_ACCESS); | 338 profile_, Profile::EXPLICIT_ACCESS); |
341 | 339 |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 BrowserThread::UI, FROM_HERE, | 706 BrowserThread::UI, FROM_HERE, |
709 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, | 707 base::Bind(&BrowsingDataRemover::OnClearedServerBoundCerts, |
710 base::Unretained(this))); | 708 base::Unretained(this))); |
711 } | 709 } |
712 | 710 |
713 void BrowsingDataRemover::OnClearedServerBoundCerts() { | 711 void BrowsingDataRemover::OnClearedServerBoundCerts() { |
714 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 712 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
715 waiting_for_clear_server_bound_certs_ = false; | 713 waiting_for_clear_server_bound_certs_ = false; |
716 NotifyAndDeleteIfDone(); | 714 NotifyAndDeleteIfDone(); |
717 } | 715 } |
OLD | NEW |