| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/safe_browsing_db/remote_database_manager.h" | 5 #include "components/safe_browsing_db/remote_database_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 bool RemoteSafeBrowsingDatabaseManager::CanCheckResourceType( | 158 bool RemoteSafeBrowsingDatabaseManager::CanCheckResourceType( |
| 159 content::ResourceType resource_type) const { | 159 content::ResourceType resource_type) const { |
| 160 return resource_types_to_check_.count(resource_type) > 0; | 160 return resource_types_to_check_.count(resource_type) > 0; |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool RemoteSafeBrowsingDatabaseManager::CanCheckUrl(const GURL& url) const { | 163 bool RemoteSafeBrowsingDatabaseManager::CanCheckUrl(const GURL& url) const { |
| 164 return url.SchemeIs(url::kHttpsScheme) || url.SchemeIs(url::kHttpScheme) || | 164 return url.SchemeIs(url::kHttpsScheme) || url.SchemeIs(url::kHttpScheme) || |
| 165 url.SchemeIs(url::kFtpScheme); | 165 url.SchemeIs(url::kFtpScheme); |
| 166 } | 166 } |
| 167 | 167 |
| 168 bool RemoteSafeBrowsingDatabaseManager::download_protection_enabled() const { | 168 bool RemoteSafeBrowsingDatabaseManager::IsDownloadProtectionEnabled() const { |
| 169 return false; | 169 return false; |
| 170 } | 170 } |
| 171 | 171 |
| 172 bool RemoteSafeBrowsingDatabaseManager::CheckDownloadUrl( | 172 bool RemoteSafeBrowsingDatabaseManager::CheckDownloadUrl( |
| 173 const std::vector<GURL>& url_chain, | 173 const std::vector<GURL>& url_chain, |
| 174 Client* client) { | 174 Client* client) { |
| 175 NOTREACHED(); | 175 NOTREACHED(); |
| 176 return true; | 176 return true; |
| 177 } | 177 } |
| 178 | 178 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 for (auto req : to_callback) { | 299 for (auto req : to_callback) { |
| 300 DVLOG(1) << "Stopping: Invoking unfinished req for URL " << req->url(); | 300 DVLOG(1) << "Stopping: Invoking unfinished req for URL " << req->url(); |
| 301 req->OnRequestDone(SB_THREAT_TYPE_SAFE, ThreatMetadata()); | 301 req->OnRequestDone(SB_THREAT_TYPE_SAFE, ThreatMetadata()); |
| 302 } | 302 } |
| 303 enabled_ = false; | 303 enabled_ = false; |
| 304 | 304 |
| 305 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown); | 305 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace safe_browsing | 308 } // namespace safe_browsing |
| OLD | NEW |