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

Unified Diff: chrome/browser/ui/webui/interstitials/interstitial_ui.cc

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/interstitials/interstitial_ui.cc
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
index b85d0059e1e781b0fda53161d829ccd5740a1553..1524407d50b7ea554af32d614f5f0f46f0fe4398 100644
--- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
+++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
@@ -174,9 +174,10 @@ BadClockBlockingPage* CreateBadClockBlockingPage(
base::Callback<void(bool)>());
}
-SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
+safe_browsing::SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
content::WebContents* web_contents) {
- SBThreatType threat_type = SB_THREAT_TYPE_URL_MALWARE;
+ safe_browsing::SBThreatType threat_type =
+ safe_browsing::SB_THREAT_TYPE_URL_MALWARE;
GURL request_url("http://example.com");
std::string url_param;
if (net::GetValueForKeyInQuery(web_contents->GetURL(),
@@ -190,13 +191,13 @@ SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
"type",
&type_param)) {
if (type_param == "malware") {
- threat_type = SB_THREAT_TYPE_URL_MALWARE;
+ threat_type = safe_browsing::SB_THREAT_TYPE_URL_MALWARE;
} else if (type_param == "phishing") {
- threat_type = SB_THREAT_TYPE_URL_PHISHING;
+ threat_type = safe_browsing::SB_THREAT_TYPE_URL_PHISHING;
} else if (type_param == "clientside_malware") {
- threat_type = SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL;
+ threat_type = safe_browsing::SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL;
} else if (type_param == "clientside_phishing") {
- threat_type = SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL;
+ threat_type = safe_browsing::SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL;
// Interstitials for client side phishing urls load after the page loads
// (see SafeBrowsingBlockingPage::IsMainPageLoadBlocked), so there should
// either be a new navigation entry, or there shouldn't be any pending
@@ -206,11 +207,11 @@ SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
controller->DiscardNonCommittedEntries();
}
}
- SafeBrowsingBlockingPage::UnsafeResource resource;
+ safe_browsing::SafeBrowsingBlockingPage::UnsafeResource resource;
resource.url = request_url;
resource.threat_type = threat_type;
// Create a blocking page without showing the interstitial.
- return SafeBrowsingBlockingPage::CreateBlockingPage(
+ return safe_browsing::SafeBrowsingBlockingPage::CreateBlockingPage(
g_browser_process->safe_browsing_service()->ui_manager().get(),
web_contents,
resource);
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view_md.cc ('k') | chrome/test/base/testing_browser_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698