| 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 // Implementation of the SafeBrowsingBlockingPage class. | 5 // Implementation of the SafeBrowsingBlockingPage class. |
| 6 | 6 |
| 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/google/google_util.h" | 21 #include "chrome/browser/google/google_util.h" |
| 22 #include "chrome/browser/prefs/pref_service.h" | 22 #include "chrome/browser/prefs/pref_service.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 24 #include "chrome/browser/safe_browsing/malware_details.h" | 24 #include "chrome/browser/safe_browsing/malware_details.h" |
| 25 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 25 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 26 #include "chrome/browser/tab_contents/tab_util.h" | 26 #include "chrome/browser/tab_contents/tab_util.h" |
| 27 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 27 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 28 #include "chrome/common/jstemplate_builder.h" | 28 #include "chrome/common/jstemplate_builder.h" |
| 29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
| 30 #include "chrome/common/url_constants.h" | 30 #include "chrome/common/url_constants.h" |
| 31 #include "content/browser/tab_contents/navigation_controller.h" | |
| 32 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
| 32 #include "content/public/browser/navigation_controller.h" |
| 33 #include "content/public/browser/user_metrics.h" | 33 #include "content/public/browser/user_metrics.h" |
| 34 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
| 35 #include "grit/browser_resources.h" | 35 #include "grit/browser_resources.h" |
| 36 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 37 #include "grit/locale_settings.h" | 37 #include "grit/locale_settings.h" |
| 38 #include "net/base/escape.h" | 38 #include "net/base/escape.h" |
| 39 #include "ui/base/l10n/l10n_util.h" | 39 #include "ui/base/l10n/l10n_util.h" |
| 40 #include "ui/base/resource/resource_bundle.h" | 40 #include "ui/base/resource/resource_bundle.h" |
| 41 | 41 |
| 42 using content::BrowserThread; | 42 using content::BrowserThread; |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 // Client-side phishing detection interstitials never block the main frame | 743 // Client-side phishing detection interstitials never block the main frame |
| 744 // load, since they happen after the page is finished loading. | 744 // load, since they happen after the page is finished loading. |
| 745 if (unsafe_resources[0].threat_type == | 745 if (unsafe_resources[0].threat_type == |
| 746 SafeBrowsingService::CLIENT_SIDE_PHISHING_URL) { | 746 SafeBrowsingService::CLIENT_SIDE_PHISHING_URL) { |
| 747 return false; | 747 return false; |
| 748 } | 748 } |
| 749 | 749 |
| 750 // Otherwise, check the threat type. | 750 // Otherwise, check the threat type. |
| 751 return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource; | 751 return unsafe_resources.size() == 1 && !unsafe_resources[0].is_subresource; |
| 752 } | 752 } |
| OLD | NEW |