| 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/safe_browsing/safe_browsing_service.h" | 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 ping_manager_ = NULL; | 575 ping_manager_ = NULL; |
| 576 } | 576 } |
| 577 } | 577 } |
| 578 | 578 |
| 579 void SafeBrowsingService::Start() { | 579 void SafeBrowsingService::Start() { |
| 580 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 580 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 581 | 581 |
| 582 BrowserThread::PostTask( | 582 BrowserThread::PostTask( |
| 583 BrowserThread::IO, FROM_HERE, | 583 BrowserThread::IO, FROM_HERE, |
| 584 base::Bind(&SafeBrowsingService::StartOnIOThread, this, | 584 base::Bind(&SafeBrowsingService::StartOnIOThread, this, |
| 585 url_request_context_getter_)); | 585 base::RetainedRef(url_request_context_getter_))); |
| 586 } | 586 } |
| 587 | 587 |
| 588 void SafeBrowsingService::Stop(bool shutdown) { | 588 void SafeBrowsingService::Stop(bool shutdown) { |
| 589 BrowserThread::PostTask( | 589 BrowserThread::PostTask( |
| 590 BrowserThread::IO, FROM_HERE, | 590 BrowserThread::IO, FROM_HERE, |
| 591 base::Bind(&SafeBrowsingService::StopOnIOThread, this, shutdown)); | 591 base::Bind(&SafeBrowsingService::StopOnIOThread, this, shutdown)); |
| 592 } | 592 } |
| 593 | 593 |
| 594 void SafeBrowsingService::Observe(int type, | 594 void SafeBrowsingService::Observe(int type, |
| 595 const content::NotificationSource& source, | 595 const content::NotificationSource& source, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 } | 693 } |
| 694 | 694 |
| 695 void SafeBrowsingService::OnSendSerializedDownloadReport( | 695 void SafeBrowsingService::OnSendSerializedDownloadReport( |
| 696 const std::string& report) { | 696 const std::string& report) { |
| 697 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 697 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 698 if (ping_manager()) | 698 if (ping_manager()) |
| 699 ping_manager()->ReportThreatDetails(report); | 699 ping_manager()->ReportThreatDetails(report); |
| 700 } | 700 } |
| 701 | 701 |
| 702 } // namespace safe_browsing | 702 } // namespace safe_browsing |
| OLD | NEW |