| 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/ui_manager.h" | 5 #include "chrome/browser/safe_browsing/ui_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/debug/leak_tracker.h" | 10 #include "base/debug/leak_tracker.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace | 77 } // namespace |
| 78 | 78 |
| 79 namespace safe_browsing { | 79 namespace safe_browsing { |
| 80 | 80 |
| 81 // SafeBrowsingUIManager::UnsafeResource --------------------------------------- | 81 // SafeBrowsingUIManager::UnsafeResource --------------------------------------- |
| 82 | 82 |
| 83 SafeBrowsingUIManager::UnsafeResource::UnsafeResource() | 83 SafeBrowsingUIManager::UnsafeResource::UnsafeResource() |
| 84 : is_subresource(false), | 84 : is_subresource(false), |
| 85 is_subframe(false), |
| 85 threat_type(SB_THREAT_TYPE_SAFE), | 86 threat_type(SB_THREAT_TYPE_SAFE), |
| 86 threat_source(safe_browsing::ThreatSource::UNKNOWN) {} | 87 threat_source(safe_browsing::ThreatSource::UNKNOWN) {} |
| 87 | 88 |
| 88 SafeBrowsingUIManager::UnsafeResource::UnsafeResource( | 89 SafeBrowsingUIManager::UnsafeResource::UnsafeResource( |
| 89 const UnsafeResource& other) = default; | 90 const UnsafeResource& other) = default; |
| 90 | 91 |
| 91 SafeBrowsingUIManager::UnsafeResource::~UnsafeResource() { } | 92 SafeBrowsingUIManager::UnsafeResource::~UnsafeResource() { } |
| 92 | 93 |
| 93 bool SafeBrowsingUIManager::UnsafeResource::IsMainPageLoadBlocked() const { | 94 bool SafeBrowsingUIManager::UnsafeResource::IsMainPageLoadBlocked() const { |
| 94 // Subresource hits cannot happen until after main page load is committed. | 95 // Subresource hits cannot happen until after main page load is committed. |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 431 |
| 431 bool whitelisted = site_list->Contains(lookup_url); | 432 bool whitelisted = site_list->Contains(lookup_url); |
| 432 if (whitelist_only) { | 433 if (whitelist_only) { |
| 433 return whitelisted; | 434 return whitelisted; |
| 434 } else { | 435 } else { |
| 435 return whitelisted || site_list->ContainsPending(lookup_url); | 436 return whitelisted || site_list->ContainsPending(lookup_url); |
| 436 } | 437 } |
| 437 } | 438 } |
| 438 | 439 |
| 439 } // namespace safe_browsing | 440 } // namespace safe_browsing |
| OLD | NEW |