| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/base_ui_manager.h" | 5 #include "components/safe_browsing/base_ui_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 return; | 237 return; |
| 238 } | 238 } |
| 239 | 239 |
| 240 void BaseUIManager::CreateAndSendHitReport(const UnsafeResource& resource) {} | 240 void BaseUIManager::CreateAndSendHitReport(const UnsafeResource& resource) {} |
| 241 | 241 |
| 242 void BaseUIManager::ShowBlockingPageForResource( | 242 void BaseUIManager::ShowBlockingPageForResource( |
| 243 const UnsafeResource& resource) { | 243 const UnsafeResource& resource) { |
| 244 BaseBlockingPage::ShowBlockingPage(this, resource); | 244 BaseBlockingPage::ShowBlockingPage(this, resource); |
| 245 } | 245 } |
| 246 | 246 |
| 247 // A safebrowsing hit is sent after a blocking page for malware/phishing | 247 // A SafeBrowsing hit is sent after a blocking page for malware/phishing |
| 248 // or after the warning dialog for download urls, only for extended_reporting | 248 // or after the warning dialog for download urls, only for extended_reporting |
| 249 // users who are not in incognito mode. | 249 // users who are not in incognito mode. |
| 250 void BaseUIManager::MaybeReportSafeBrowsingHit( | 250 void BaseUIManager::MaybeReportSafeBrowsingHit( |
| 251 const HitReport& hit_report, | 251 const HitReport& hit_report, |
| 252 content::WebContents* web_contents) { | 252 const content::WebContents* web_contents) { |
| 253 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 253 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 254 return; | 254 return; |
| 255 } | 255 } |
| 256 | 256 |
| 257 void BaseUIManager::ReportSafeBrowsingHitOnIOThread( | 257 void BaseUIManager::ReportSafeBrowsingHitOnIOThread( |
| 258 const HitReport& hit_report) { | 258 const HitReport& hit_report) { |
| 259 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 259 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 260 return; | 260 return; |
| 261 } | 261 } |
| 262 | 262 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 if (resource.is_subresource) { | 353 if (resource.is_subresource) { |
| 354 NavigationEntry* entry = resource.GetNavigationEntryForResource(); | 354 NavigationEntry* entry = resource.GetNavigationEntryForResource(); |
| 355 if (!entry) | 355 if (!entry) |
| 356 return GURL(); | 356 return GURL(); |
| 357 return entry->GetURL().GetWithEmptyPath(); | 357 return entry->GetURL().GetWithEmptyPath(); |
| 358 } | 358 } |
| 359 return resource.url.GetWithEmptyPath(); | 359 return resource.url.GetWithEmptyPath(); |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace safe_browsing | 362 } // namespace safe_browsing |
| OLD | NEW |