OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 |
11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
| 14 #include "base/singleton.h" |
14 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
15 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
16 #include "base/values.h" | 17 #include "base/values.h" |
17 #include "chrome/browser/browser_thread.h" | 18 #include "chrome/browser/browser_thread.h" |
18 #include "chrome/browser/dom_operation_notification_details.h" | 19 #include "chrome/browser/dom_operation_notification_details.h" |
19 #include "chrome/browser/dom_ui/new_tab_ui.h" | 20 #include "chrome/browser/dom_ui/new_tab_ui.h" |
20 #include "chrome/browser/google/google_util.h" | 21 #include "chrome/browser/google/google_util.h" |
21 #include "chrome/browser/metrics/user_metrics.h" | 22 #include "chrome/browser/metrics/user_metrics.h" |
22 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 23 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
23 #include "chrome/browser/tab_contents/navigation_controller.h" | 24 #include "chrome/browser/tab_contents/navigation_controller.h" |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 UnsafeResourceMap* unsafe_resource_map = GetUnsafeResourcesMap(); | 548 UnsafeResourceMap* unsafe_resource_map = GetUnsafeResourcesMap(); |
548 (*unsafe_resource_map)[tab_contents].push_back(unsafe_resource); | 549 (*unsafe_resource_map)[tab_contents].push_back(unsafe_resource); |
549 } | 550 } |
550 | 551 |
551 // static | 552 // static |
552 bool SafeBrowsingBlockingPage::IsMainPage( | 553 bool SafeBrowsingBlockingPage::IsMainPage( |
553 const UnsafeResourceList& unsafe_resources) { | 554 const UnsafeResourceList& unsafe_resources) { |
554 return unsafe_resources.size() == 1 && | 555 return unsafe_resources.size() == 1 && |
555 unsafe_resources[0].resource_type == ResourceType::MAIN_FRAME; | 556 unsafe_resources[0].resource_type == ResourceType::MAIN_FRAME; |
556 } | 557 } |
OLD | NEW |