| 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 12 matching lines...) Expand all Loading... |
| 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/blacklist_load_analyze
r.h" |
| 32 #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" |
| 33 #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signat
ure_analyzer.h" | |
| 34 #include "chrome/browser/safe_browsing/malware_details.h" | 33 #include "chrome/browser/safe_browsing/malware_details.h" |
| 35 #include "chrome/browser/safe_browsing/ping_manager.h" | 34 #include "chrome/browser/safe_browsing/ping_manager.h" |
| 36 #include "chrome/browser/safe_browsing/protocol_manager.h" | 35 #include "chrome/browser/safe_browsing/protocol_manager.h" |
| 37 #include "chrome/browser/safe_browsing/safe_browsing_database.h" | 36 #include "chrome/browser/safe_browsing/safe_browsing_database.h" |
| 38 #include "chrome/browser/safe_browsing/ui_manager.h" | 37 #include "chrome/browser/safe_browsing/ui_manager.h" |
| 39 #include "chrome/common/chrome_constants.h" | 38 #include "chrome/common/chrome_constants.h" |
| 40 #include "chrome/common/chrome_paths.h" | 39 #include "chrome/common/chrome_paths.h" |
| 41 #include "chrome/common/chrome_switches.h" | 40 #include "chrome/common/chrome_switches.h" |
| 42 #include "chrome/common/pref_names.h" | 41 #include "chrome/common/pref_names.h" |
| 43 #include "chrome/common/url_constants.h" | 42 #include "chrome/common/url_constants.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 #if defined(FULL_SAFE_BROWSING) | 355 #if defined(FULL_SAFE_BROWSING) |
| 357 return new SafeBrowsingDatabaseManager(this); | 356 return new SafeBrowsingDatabaseManager(this); |
| 358 #else | 357 #else |
| 359 return NULL; | 358 return NULL; |
| 360 #endif | 359 #endif |
| 361 } | 360 } |
| 362 | 361 |
| 363 void SafeBrowsingService::RegisterAllDelayedAnalysis() { | 362 void SafeBrowsingService::RegisterAllDelayedAnalysis() { |
| 364 safe_browsing::RegisterBinaryIntegrityAnalysis(); | 363 safe_browsing::RegisterBinaryIntegrityAnalysis(); |
| 365 safe_browsing::RegisterBlacklistLoadAnalysis(); | 364 safe_browsing::RegisterBlacklistLoadAnalysis(); |
| 366 safe_browsing::RegisterVariationsSeedSignatureAnalysis(); | |
| 367 } | 365 } |
| 368 | 366 |
| 369 void SafeBrowsingService::InitURLRequestContextOnIOThread( | 367 void SafeBrowsingService::InitURLRequestContextOnIOThread( |
| 370 net::URLRequestContextGetter* system_url_request_context_getter) { | 368 net::URLRequestContextGetter* system_url_request_context_getter) { |
| 371 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 369 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 372 DCHECK(!url_request_context_.get()); | 370 DCHECK(!url_request_context_.get()); |
| 373 | 371 |
| 374 scoped_refptr<net::CookieStore> cookie_store( | 372 scoped_refptr<net::CookieStore> cookie_store( |
| 375 content::CreateCookieStore( | 373 content::CreateCookieStore( |
| 376 content::CookieStoreConfig( | 374 content::CookieStoreConfig( |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 else | 557 else |
| 560 Stop(false); | 558 Stop(false); |
| 561 | 559 |
| 562 #if defined(FULL_SAFE_BROWSING) | 560 #if defined(FULL_SAFE_BROWSING) |
| 563 if (csd_service_) | 561 if (csd_service_) |
| 564 csd_service_->SetEnabledAndRefreshState(enable); | 562 csd_service_->SetEnabledAndRefreshState(enable); |
| 565 if (download_service_) | 563 if (download_service_) |
| 566 download_service_->SetEnabled(enable); | 564 download_service_->SetEnabled(enable); |
| 567 #endif | 565 #endif |
| 568 } | 566 } |
| OLD | NEW |