OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
35 #include "content/public/browser/notification_service.h" | 35 #include "content/public/browser/notification_service.h" |
36 #include "content/public/browser/notification_types.h" | 36 #include "content/public/browser/notification_types.h" |
37 #include "net/base/registry_controlled_domain.h" | 37 #include "net/base/registry_controlled_domain.h" |
38 #include "net/url_request/url_request_context_getter.h" | 38 #include "net/url_request/url_request_context_getter.h" |
39 | 39 |
40 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
41 #include "chrome/installer/util/browser_distribution.h" | 41 #include "chrome/installer/util/browser_distribution.h" |
42 #endif | 42 #endif |
43 | 43 |
| 44 using content::BrowserThread; |
| 45 |
44 namespace { | 46 namespace { |
45 | 47 |
46 // The default URL prefix where browser fetches chunk updates, hashes, | 48 // The default URL prefix where browser fetches chunk updates, hashes, |
47 // and reports safe browsing hits. | 49 // and reports safe browsing hits. |
48 const char* const kSbDefaultInfoURLPrefix = | 50 const char* const kSbDefaultInfoURLPrefix = |
49 "http://safebrowsing.clients.google.com/safebrowsing"; | 51 "http://safebrowsing.clients.google.com/safebrowsing"; |
50 | 52 |
51 // The default URL prefix where browser fetches MAC client key and reports | 53 // The default URL prefix where browser fetches MAC client key and reports |
52 // malware details. | 54 // malware details. |
53 const char* const kSbDefaultMacKeyURLPrefix = | 55 const char* const kSbDefaultMacKeyURLPrefix = |
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 Stop(); | 1361 Stop(); |
1360 | 1362 |
1361 if (csd_service_.get()) | 1363 if (csd_service_.get()) |
1362 csd_service_->SetEnabledAndRefreshState(enable); | 1364 csd_service_->SetEnabledAndRefreshState(enable); |
1363 if (download_service_.get()) { | 1365 if (download_service_.get()) { |
1364 download_service_->SetEnabled( | 1366 download_service_->SetEnabled( |
1365 enable && CommandLine::ForCurrentProcess()->HasSwitch( | 1367 enable && CommandLine::ForCurrentProcess()->HasSwitch( |
1366 switches::kEnableImprovedDownloadProtection)); | 1368 switches::kEnableImprovedDownloadProtection)); |
1367 } | 1369 } |
1368 } | 1370 } |
OLD | NEW |