| 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 // Implementation of the ThreatDetailsRedirectsCollector class. | 5 // Implementation of the ThreatDetailsRedirectsCollector class. |
| 6 | 6 |
| 7 #include "chrome/browser/safe_browsing/threat_details_history.h" | 7 #include "chrome/browser/safe_browsing/threat_details_history.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 has_started_ = true; | 39 has_started_ = true; |
| 40 callback_ = callback; | 40 callback_ = callback; |
| 41 | 41 |
| 42 if (urls.size() == 0) { | 42 if (urls.size() == 0) { |
| 43 AllDone(); | 43 AllDone(); |
| 44 return; | 44 return; |
| 45 } | 45 } |
| 46 | 46 |
| 47 BrowserThread::PostTask( | 47 BrowserThread::PostTask( |
| 48 BrowserThread::UI, FROM_HERE, | 48 BrowserThread::UI, FROM_HERE, |
| 49 base::Bind(&ThreatDetailsRedirectsCollector::StartGetRedirects, this, | 49 base::BindOnce(&ThreatDetailsRedirectsCollector::StartGetRedirects, this, |
| 50 urls)); | 50 urls)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 bool ThreatDetailsRedirectsCollector::HasStarted() const { | 53 bool ThreatDetailsRedirectsCollector::HasStarted() const { |
| 54 return has_started_; | 54 return has_started_; |
| 55 } | 55 } |
| 56 | 56 |
| 57 const std::vector<RedirectChain>& | 57 const std::vector<RedirectChain>& |
| 58 ThreatDetailsRedirectsCollector::GetCollectedUrls() const { | 58 ThreatDetailsRedirectsCollector::GetCollectedUrls() const { |
| 59 return redirects_urls_; | 59 return redirects_urls_; |
| 60 } | 60 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 callback_.Reset(); | 114 callback_.Reset(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void ThreatDetailsRedirectsCollector::HistoryServiceBeingDeleted( | 117 void ThreatDetailsRedirectsCollector::HistoryServiceBeingDeleted( |
| 118 history::HistoryService* history_service) { | 118 history::HistoryService* history_service) { |
| 119 history_service_observer_.Remove(history_service); | 119 history_service_observer_.Remove(history_service); |
| 120 history_service_.reset(); | 120 history_service_.reset(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace safe_browsing | 123 } // namespace safe_browsing |
| OLD | NEW |