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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 ping_manager_ = NULL; | 570 ping_manager_ = NULL; |
571 } | 571 } |
572 } | 572 } |
573 | 573 |
574 void SafeBrowsingService::Start() { | 574 void SafeBrowsingService::Start() { |
575 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 575 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
576 | 576 |
577 BrowserThread::PostTask( | 577 BrowserThread::PostTask( |
578 BrowserThread::IO, FROM_HERE, | 578 BrowserThread::IO, FROM_HERE, |
579 base::Bind(&SafeBrowsingService::StartOnIOThread, this, | 579 base::Bind(&SafeBrowsingService::StartOnIOThread, this, |
580 url_request_context_getter_)); | 580 base::RetainedRef(url_request_context_getter_))); |
581 } | 581 } |
582 | 582 |
583 void SafeBrowsingService::Stop(bool shutdown) { | 583 void SafeBrowsingService::Stop(bool shutdown) { |
584 BrowserThread::PostTask( | 584 BrowserThread::PostTask( |
585 BrowserThread::IO, FROM_HERE, | 585 BrowserThread::IO, FROM_HERE, |
586 base::Bind(&SafeBrowsingService::StopOnIOThread, this, shutdown)); | 586 base::Bind(&SafeBrowsingService::StopOnIOThread, this, shutdown)); |
587 } | 587 } |
588 | 588 |
589 void SafeBrowsingService::Observe(int type, | 589 void SafeBrowsingService::Observe(int type, |
590 const content::NotificationSource& source, | 590 const content::NotificationSource& source, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 } | 688 } |
689 | 689 |
690 void SafeBrowsingService::OnSendDownloadRecoveryReport( | 690 void SafeBrowsingService::OnSendDownloadRecoveryReport( |
691 const std::string& report) { | 691 const std::string& report) { |
692 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 692 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
693 if (ping_manager()) | 693 if (ping_manager()) |
694 ping_manager()->ReportThreatDetails(report); | 694 ping_manager()->ReportThreatDetails(report); |
695 } | 695 } |
696 | 696 |
697 } // namespace safe_browsing | 697 } // namespace safe_browsing |
OLD | NEW |