| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/local_database_manager.h" | 5 #include "chrome/browser/safe_browsing/local_database_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 } | 265 } |
| 266 default: | 266 default: |
| 267 NOTREACHED(); | 267 NOTREACHED(); |
| 268 } | 268 } |
| 269 } else { | 269 } else { |
| 270 NOTREACHED(); | 270 NOTREACHED(); |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 | 273 |
| 274 LocalSafeBrowsingDatabaseManager::LocalSafeBrowsingDatabaseManager( | 274 LocalSafeBrowsingDatabaseManager::LocalSafeBrowsingDatabaseManager( |
| 275 const scoped_refptr<SafeBrowsingService>& service) : | 275 const scoped_refptr<SafeBrowsingService>& service) |
| 276 LocalSafeBrowsingDatabaseManager(service, NULL, V4ProtocolConfig()) { | 276 : sb_service_(service), |
| 277 } | |
| 278 | |
| 279 LocalSafeBrowsingDatabaseManager::LocalSafeBrowsingDatabaseManager( | |
| 280 const scoped_refptr<SafeBrowsingService>& service, | |
| 281 net::URLRequestContextGetter* request_context_getter, | |
| 282 const V4ProtocolConfig& config) | |
| 283 : SafeBrowsingDatabaseManager(request_context_getter, config), | |
| 284 sb_service_(service), | |
| 285 database_(NULL), | 277 database_(NULL), |
| 286 enabled_(false), | 278 enabled_(false), |
| 287 enable_download_protection_(false), | 279 enable_download_protection_(false), |
| 288 enable_csd_whitelist_(false), | 280 enable_csd_whitelist_(false), |
| 289 enable_download_whitelist_(false), | 281 enable_download_whitelist_(false), |
| 290 enable_extension_blacklist_(false), | 282 enable_extension_blacklist_(false), |
| 291 enable_ip_blacklist_(false), | 283 enable_ip_blacklist_(false), |
| 292 enable_unwanted_software_blacklist_(true), | 284 enable_unwanted_software_blacklist_(true), |
| 293 enable_module_whitelist_(true), | 285 enable_module_whitelist_(true), |
| 294 update_in_progress_(false), | 286 update_in_progress_(false), |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1284 FROM_HERE, base::Bind(&LocalSafeBrowsingDatabaseManager::TimeoutCallback, | 1276 FROM_HERE, base::Bind(&LocalSafeBrowsingDatabaseManager::TimeoutCallback, |
| 1285 check->weak_ptr_factory_->GetWeakPtr(), check), | 1277 check->weak_ptr_factory_->GetWeakPtr(), check), |
| 1286 check_timeout_); | 1278 check_timeout_); |
| 1287 } | 1279 } |
| 1288 | 1280 |
| 1289 bool LocalSafeBrowsingDatabaseManager::download_protection_enabled() const { | 1281 bool LocalSafeBrowsingDatabaseManager::download_protection_enabled() const { |
| 1290 return enable_download_protection_; | 1282 return enable_download_protection_; |
| 1291 } | 1283 } |
| 1292 | 1284 |
| 1293 } // namespace safe_browsing | 1285 } // namespace safe_browsing |
| OLD | NEW |