| 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 // 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 } | 307 } |
| 308 | 308 |
| 309 // Otherwise the offending entry has committed, and we need to go back or | 309 // Otherwise the offending entry has committed, and we need to go back or |
| 310 // to a safe page. We will close the interstitial when that page commits. | 310 // to a safe page. We will close the interstitial when that page commits. |
| 311 if (web_contents_->GetController().CanGoBack()) { | 311 if (web_contents_->GetController().CanGoBack()) { |
| 312 web_contents_->GetController().GoBack(); | 312 web_contents_->GetController().GoBack(); |
| 313 } else { | 313 } else { |
| 314 web_contents_->GetController().LoadURL( | 314 web_contents_->GetController().LoadURL( |
| 315 GURL(chrome::kChromeUINewTabURL), | 315 GURL(chrome::kChromeUINewTabURL), |
| 316 content::Referrer(), | 316 content::Referrer(), |
| 317 content::PAGE_TRANSITION_START_PAGE, | 317 content::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 318 std::string()); | 318 std::string()); |
| 319 } | 319 } |
| 320 return; | 320 return; |
| 321 } | 321 } |
| 322 | 322 |
| 323 // The "report error" and "show diagnostic" commands can have a number | 323 // The "report error" and "show diagnostic" commands can have a number |
| 324 // appended to them, which is the index of the element they apply to. | 324 // appended to them, which is the index of the element they apply to. |
| 325 int element_index = 0; | 325 int element_index = 0; |
| 326 size_t colon_index = command.find(':'); | 326 size_t colon_index = command.find(':'); |
| 327 if (colon_index != std::string::npos) { | 327 if (colon_index != std::string::npos) { |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 strings->SetString("learnMore", | 1146 strings->SetString("learnMore", |
| 1147 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE)); | 1147 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE)); |
| 1148 strings->SetString("details", | 1148 strings->SetString("details", |
| 1149 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_DETAILS)); | 1149 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_DETAILS)); |
| 1150 } | 1150 } |
| 1151 | 1151 |
| 1152 void SafeBrowsingBlockingPageV2::PopulatePhishingStringDictionary( | 1152 void SafeBrowsingBlockingPageV2::PopulatePhishingStringDictionary( |
| 1153 DictionaryValue* strings) { | 1153 DictionaryValue* strings) { |
| 1154 NOTREACHED(); | 1154 NOTREACHED(); |
| 1155 } | 1155 } |
| OLD | NEW |