| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/callback.h" | 10 #include "base/callback.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 void BrowsingDataRemover::ClearedNetworkHistory() { | 375 void BrowsingDataRemover::ClearedNetworkHistory() { |
| 376 waiting_for_clear_networking_history_ = false; | 376 waiting_for_clear_networking_history_ = false; |
| 377 | 377 |
| 378 NotifyAndDeleteIfDone(); | 378 NotifyAndDeleteIfDone(); |
| 379 } | 379 } |
| 380 | 380 |
| 381 void BrowsingDataRemover::ClearNetworkingHistory(IOThread* io_thread) { | 381 void BrowsingDataRemover::ClearNetworkingHistory(IOThread* io_thread) { |
| 382 // This function should be called on the IO thread. | 382 // This function should be called on the IO thread. |
| 383 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 383 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 384 | 384 |
| 385 io_thread->ClearNetworkingHistory(); | 385 io_thread->ClearNetworkingHistory(profile_->GetPredictor()); |
| 386 | 386 |
| 387 // Notify the UI thread that we are done. | 387 // Notify the UI thread that we are done. |
| 388 BrowserThread::PostTask( | 388 BrowserThread::PostTask( |
| 389 BrowserThread::UI, FROM_HERE, | 389 BrowserThread::UI, FROM_HERE, |
| 390 NewRunnableMethod(this, &BrowsingDataRemover::ClearedNetworkHistory)); | 390 NewRunnableMethod(this, &BrowsingDataRemover::ClearedNetworkHistory)); |
| 391 } | 391 } |
| 392 | 392 |
| 393 void BrowsingDataRemover::ClearedCache() { | 393 void BrowsingDataRemover::ClearedCache() { |
| 394 waiting_for_clear_cache_ = false; | 394 waiting_for_clear_cache_ = false; |
| 395 | 395 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 | 616 |
| 617 ClearGearsData(profile_dir); | 617 ClearGearsData(profile_dir); |
| 618 OnClearedGearsData(); | 618 OnClearedGearsData(); |
| 619 } | 619 } |
| 620 | 620 |
| 621 void BrowsingDataRemover::OnWaitableEventSignaled( | 621 void BrowsingDataRemover::OnWaitableEventSignaled( |
| 622 base::WaitableEvent* waitable_event) { | 622 base::WaitableEvent* waitable_event) { |
| 623 waiting_for_clear_lso_data_ = false; | 623 waiting_for_clear_lso_data_ = false; |
| 624 NotifyAndDeleteIfDone(); | 624 NotifyAndDeleteIfDone(); |
| 625 } | 625 } |
| OLD | NEW |