| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.h" | 5 #include "ios/chrome/browser/browsing_data/ios_chrome_browsing_data_remover.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 440 |
| 441 NotifyAndDeleteIfDone(); | 441 NotifyAndDeleteIfDone(); |
| 442 } | 442 } |
| 443 | 443 |
| 444 void IOSChromeBrowsingDataRemover::OnClearedPasswords() { | 444 void IOSChromeBrowsingDataRemover::OnClearedPasswords() { |
| 445 DCHECK_CURRENTLY_ON(WebThread::UI); | 445 DCHECK_CURRENTLY_ON(WebThread::UI); |
| 446 waiting_for_clear_passwords_ = false; | 446 waiting_for_clear_passwords_ = false; |
| 447 NotifyAndDeleteIfDone(); | 447 NotifyAndDeleteIfDone(); |
| 448 } | 448 } |
| 449 | 449 |
| 450 void IOSChromeBrowsingDataRemover::OnClearedCookies(int num_deleted) { | 450 void IOSChromeBrowsingDataRemover::OnClearedCookies(uint32_t num_deleted) { |
| 451 if (!WebThread::CurrentlyOn(WebThread::UI)) { | 451 if (!WebThread::CurrentlyOn(WebThread::UI)) { |
| 452 WebThread::PostTask( | 452 WebThread::PostTask( |
| 453 WebThread::UI, FROM_HERE, | 453 WebThread::UI, FROM_HERE, |
| 454 base::Bind(&IOSChromeBrowsingDataRemover::OnClearedCookies, | 454 base::Bind(&IOSChromeBrowsingDataRemover::OnClearedCookies, |
| 455 base::Unretained(this), num_deleted)); | 455 base::Unretained(this), num_deleted)); |
| 456 return; | 456 return; |
| 457 } | 457 } |
| 458 | 458 |
| 459 DCHECK_GT(waiting_for_clear_cookies_count_, 0); | 459 DCHECK_GT(waiting_for_clear_cookies_count_, 0); |
| 460 --waiting_for_clear_cookies_count_; | 460 --waiting_for_clear_cookies_count_; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 waiting_for_clear_autofill_origin_urls_ = false; | 515 waiting_for_clear_autofill_origin_urls_ = false; |
| 516 NotifyAndDeleteIfDone(); | 516 NotifyAndDeleteIfDone(); |
| 517 } | 517 } |
| 518 | 518 |
| 519 // static | 519 // static |
| 520 IOSChromeBrowsingDataRemover::CallbackSubscription | 520 IOSChromeBrowsingDataRemover::CallbackSubscription |
| 521 IOSChromeBrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 521 IOSChromeBrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
| 522 const IOSChromeBrowsingDataRemover::Callback& callback) { | 522 const IOSChromeBrowsingDataRemover::Callback& callback) { |
| 523 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 523 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
| 524 } | 524 } |
| OLD | NEW |