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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/threading/thread_restrictions.h" | 21 #include "base/threading/thread_restrictions.h" |
22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
23 #include "chrome/browser/chrome_notification_types.h" | 23 #include "chrome/browser/chrome_notification_types.h" |
24 #include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h" | 24 #include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h" |
25 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
26 #include "chrome/browser/profiles/profile_manager.h" | 26 #include "chrome/browser/profiles/profile_manager.h" |
27 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 27 #include "chrome/browser/safe_browsing/client_side_detection_service.h" |
28 #include "chrome/browser/safe_browsing/database_manager.h" | 28 #include "chrome/browser/safe_browsing/database_manager.h" |
29 #include "chrome/browser/safe_browsing/download_protection_service.h" | 29 #include "chrome/browser/safe_browsing/download_protection_service.h" |
30 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy
zer.h" | 30 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy
zer.h" |
| 31 #include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyze
r.h" |
31 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser
vice.h" | 32 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser
vice.h" |
32 #include "chrome/browser/safe_browsing/malware_details.h" | 33 #include "chrome/browser/safe_browsing/malware_details.h" |
33 #include "chrome/browser/safe_browsing/ping_manager.h" | 34 #include "chrome/browser/safe_browsing/ping_manager.h" |
34 #include "chrome/browser/safe_browsing/protocol_manager.h" | 35 #include "chrome/browser/safe_browsing/protocol_manager.h" |
35 #include "chrome/browser/safe_browsing/safe_browsing_database.h" | 36 #include "chrome/browser/safe_browsing/safe_browsing_database.h" |
36 #include "chrome/browser/safe_browsing/ui_manager.h" | 37 #include "chrome/browser/safe_browsing/ui_manager.h" |
37 #include "chrome/common/chrome_constants.h" | 38 #include "chrome/common/chrome_constants.h" |
38 #include "chrome/common/chrome_paths.h" | 39 #include "chrome/common/chrome_paths.h" |
39 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
40 #include "chrome/common/pref_names.h" | 41 #include "chrome/common/pref_names.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 SafeBrowsingDatabaseManager* SafeBrowsingService::CreateDatabaseManager() { | 354 SafeBrowsingDatabaseManager* SafeBrowsingService::CreateDatabaseManager() { |
354 #if defined(FULL_SAFE_BROWSING) | 355 #if defined(FULL_SAFE_BROWSING) |
355 return new SafeBrowsingDatabaseManager(this); | 356 return new SafeBrowsingDatabaseManager(this); |
356 #else | 357 #else |
357 return NULL; | 358 return NULL; |
358 #endif | 359 #endif |
359 } | 360 } |
360 | 361 |
361 void SafeBrowsingService::RegisterAllDelayedAnalysis() { | 362 void SafeBrowsingService::RegisterAllDelayedAnalysis() { |
362 safe_browsing::RegisterBinaryIntegrityAnalysis(); | 363 safe_browsing::RegisterBinaryIntegrityAnalysis(); |
| 364 safe_browsing::RegisterBlacklistLoadAnalysis(); |
363 } | 365 } |
364 | 366 |
365 void SafeBrowsingService::InitURLRequestContextOnIOThread( | 367 void SafeBrowsingService::InitURLRequestContextOnIOThread( |
366 net::URLRequestContextGetter* system_url_request_context_getter) { | 368 net::URLRequestContextGetter* system_url_request_context_getter) { |
367 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 369 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
368 DCHECK(!url_request_context_.get()); | 370 DCHECK(!url_request_context_.get()); |
369 | 371 |
370 scoped_refptr<net::CookieStore> cookie_store( | 372 scoped_refptr<net::CookieStore> cookie_store( |
371 content::CreateCookieStore( | 373 content::CreateCookieStore( |
372 content::CookieStoreConfig( | 374 content::CookieStoreConfig( |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 else | 557 else |
556 Stop(false); | 558 Stop(false); |
557 | 559 |
558 #if defined(FULL_SAFE_BROWSING) | 560 #if defined(FULL_SAFE_BROWSING) |
559 if (csd_service_) | 561 if (csd_service_) |
560 csd_service_->SetEnabledAndRefreshState(enable); | 562 csd_service_->SetEnabledAndRefreshState(enable); |
561 if (download_service_) | 563 if (download_service_) |
562 download_service_->SetEnabled(enable); | 564 download_service_->SetEnabled(enable); |
563 #endif | 565 #endif |
564 } | 566 } |
OLD | NEW |