| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui/interstitials/interstitial_ui.h" | 5 #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h" |
| 6 | 6 |
| 7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 std::string type_param; | 233 std::string type_param; |
| 234 if (net::GetValueForKeyInQuery(web_contents->GetURL(), | 234 if (net::GetValueForKeyInQuery(web_contents->GetURL(), |
| 235 "type", | 235 "type", |
| 236 &type_param)) { | 236 &type_param)) { |
| 237 // TODO(mattm): add param for SB_THREAT_TYPE_URL_UNWANTED. | 237 // TODO(mattm): add param for SB_THREAT_TYPE_URL_UNWANTED. |
| 238 if (type_param == "malware") { | 238 if (type_param == "malware") { |
| 239 threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE; | 239 threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE; |
| 240 } else if (type_param == "phishing") { | 240 } else if (type_param == "phishing") { |
| 241 threat_type = safe_browsing::SB_THREAT_TYPE_URL_PHISHING; | 241 threat_type = safe_browsing::SB_THREAT_TYPE_URL_PHISHING; |
| 242 } else if (type_param == "clientside_malware") { | 242 } else if (type_param == "clientside_malware") { |
| 243 threat_type = safe_browsing::SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL; | 243 threat_type = safe_browsing::SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE; |
| 244 } else if (type_param == "clientside_phishing") { | 244 } else if (type_param == "clientside_phishing") { |
| 245 threat_type = safe_browsing::SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL; | 245 threat_type = safe_browsing::SB_THREAT_TYPE_URL_CLIENT_SIDE_PHISHING; |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 safe_browsing::SafeBrowsingBlockingPage::UnsafeResource resource; | 248 safe_browsing::SafeBrowsingBlockingPage::UnsafeResource resource; |
| 249 resource.url = request_url; | 249 resource.url = request_url; |
| 250 resource.is_subresource = request_url != main_frame_url; | 250 resource.is_subresource = request_url != main_frame_url; |
| 251 resource.is_subframe = false; | 251 resource.is_subframe = false; |
| 252 resource.threat_type = threat_type; | 252 resource.threat_type = threat_type; |
| 253 resource.web_contents_getter = | 253 resource.web_contents_getter = |
| 254 security_interstitials::UnsafeResource:: | 254 security_interstitials::UnsafeResource:: |
| 255 GetWebContentsGetter(web_contents->GetRenderProcessHost()->GetID(), | 255 GetWebContentsGetter(web_contents->GetRenderProcessHost()->GetID(), |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 } else if (reason_string == "not_signed_in") { | 482 } else if (reason_string == "not_signed_in") { |
| 483 reason = supervised_user_error_page::NOT_SIGNED_IN; | 483 reason = supervised_user_error_page::NOT_SIGNED_IN; |
| 484 } | 484 } |
| 485 } | 485 } |
| 486 | 486 |
| 487 return supervised_user_error_page::BuildHtml( | 487 return supervised_user_error_page::BuildHtml( |
| 488 allow_access_requests, profile_image_url, profile_image_url2, custodian, | 488 allow_access_requests, profile_image_url, profile_image_url2, custodian, |
| 489 custodian_email, second_custodian, second_custodian_email, | 489 custodian_email, second_custodian, second_custodian_email, |
| 490 is_child_account, reason, g_browser_process->GetApplicationLocale()); | 490 is_child_account, reason, g_browser_process->GetApplicationLocale()); |
| 491 } | 491 } |
| OLD | NEW |