Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve a merge conflict. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 malware_details_ = MalwareDetails::NewMalwareDetails( 258 malware_details_ = MalwareDetails::NewMalwareDetails(
259 ui_manager_, web_contents, unsafe_resources[0]); 259 ui_manager_, web_contents, unsafe_resources[0]);
260 } 260 }
261 261
262 interstitial_page_ = InterstitialPage::Create( 262 interstitial_page_ = InterstitialPage::Create(
263 web_contents, IsMainPageLoadBlocked(unsafe_resources), url_, this); 263 web_contents, IsMainPageLoadBlocked(unsafe_resources), url_, this);
264 } 264 }
265 265
266 bool SafeBrowsingBlockingPage::CanShowMalwareDetailsOption() { 266 bool SafeBrowsingBlockingPage::CanShowMalwareDetailsOption() {
267 return (!web_contents_->GetBrowserContext()->IsOffTheRecord() && 267 return (!web_contents_->GetBrowserContext()->IsOffTheRecord() &&
268 web_contents_->GetURL().SchemeIs(content::kHttpScheme)); 268 web_contents_->GetURL().SchemeIs(url::kHttpScheme));
269 } 269 }
270 270
271 SafeBrowsingBlockingPage::~SafeBrowsingBlockingPage() { 271 SafeBrowsingBlockingPage::~SafeBrowsingBlockingPage() {
272 } 272 }
273 273
274 void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) { 274 void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) {
275 std::string command(cmd); // Make a local copy so we can modify it. 275 std::string command(cmd); // Make a local copy so we can modify it.
276 // The Jasonified response has quotes, remove them. 276 // The Jasonified response has quotes, remove them.
277 if (command.length() > 1 && command[0] == '"') { 277 if (command.length() > 1 && command[0] == '"') {
278 command = command.substr(1, command.length() - 2); 278 command = command.substr(1, command.length() - 2);
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 strings->SetString("details", std::string()); 1185 strings->SetString("details", std::string());
1186 strings->SetString("confirm_text", std::string()); 1186 strings->SetString("confirm_text", std::string());
1187 strings->SetString(kBoxChecked, std::string()); 1187 strings->SetString(kBoxChecked, std::string());
1188 strings->SetString( 1188 strings->SetString(
1189 "report_error", 1189 "report_error",
1190 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR)); 1190 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_PHISHING_V2_REPORT_ERROR));
1191 strings->SetBoolean(kDisplayCheckBox, false); 1191 strings->SetBoolean(kDisplayCheckBox, false);
1192 strings->SetString("learnMore", 1192 strings->SetString("learnMore",
1193 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE)); 1193 l10n_util::GetStringUTF16(IDS_SAFE_BROWSING_MALWARE_V2_LEARN_MORE));
1194 } 1194 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/database_manager.cc ('k') | chrome/browser/safe_browsing/safe_browsing_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698