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

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

Issue 2925693003: Making CSD ReportType enum consistent. (Closed)
Patch Set: Handling SBThreatType enums as well Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/safe_browsing/chrome_password_protection_service.h" 5 #include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
6 6
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/metrics/field_trial_params.h" 8 #include "base/metrics/field_trial_params.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 const GURL& phishing_url, 141 const GURL& phishing_url,
142 const std::string& token, 142 const std::string& token,
143 content::WebContents* web_contents) { 143 content::WebContents* web_contents) {
144 DCHECK_CURRENTLY_ON(BrowserThread::UI); 144 DCHECK_CURRENTLY_ON(BrowserThread::UI);
145 if (!ui_manager_) 145 if (!ui_manager_)
146 return; 146 return;
147 security_interstitials::UnsafeResource resource; 147 security_interstitials::UnsafeResource resource;
148 resource.url = phishing_url; 148 resource.url = phishing_url;
149 resource.original_url = phishing_url; 149 resource.original_url = phishing_url;
150 resource.is_subresource = false; 150 resource.is_subresource = false;
151 resource.threat_type = SB_THREAT_TYPE_PASSWORD_PROTECTION_PHISHING_URL; 151 resource.threat_type = SB_THREAT_TYPE_URL_PASSWORD_PROTECTION_PHISHING;
152 resource.threat_source = 152 resource.threat_source =
153 safe_browsing::ThreatSource::PASSWORD_PROTECTION_SERVICE; 153 safe_browsing::ThreatSource::PASSWORD_PROTECTION_SERVICE;
154 resource.web_contents_getter = 154 resource.web_contents_getter =
155 safe_browsing::SafeBrowsingUIManager::UnsafeResource:: 155 safe_browsing::SafeBrowsingUIManager::UnsafeResource::
156 GetWebContentsGetter(web_contents->GetRenderProcessHost()->GetID(), 156 GetWebContentsGetter(web_contents->GetRenderProcessHost()->GetID(),
157 web_contents->GetMainFrame()->GetRoutingID()); 157 web_contents->GetMainFrame()->GetRoutingID());
158 resource.token = token; 158 resource.token = token;
159 if (!ui_manager_->IsWhitelisted(resource)) { 159 if (!ui_manager_->IsWhitelisted(resource)) {
160 web_contents->GetController().DiscardNonCommittedEntries(); 160 web_contents->GetController().DiscardNonCommittedEntries();
161 } 161 }
162 ui_manager_->DisplayBlockingPage(resource); 162 ui_manager_->DisplayBlockingPage(resource);
163 } 163 }
164 164
165 ChromePasswordProtectionService::ChromePasswordProtectionService( 165 ChromePasswordProtectionService::ChromePasswordProtectionService(
166 Profile* profile) 166 Profile* profile)
167 : PasswordProtectionService(nullptr, nullptr, nullptr, nullptr), 167 : PasswordProtectionService(nullptr, nullptr, nullptr, nullptr),
168 profile_(profile) {} 168 profile_(profile) {}
169 } // namespace safe_browsing 169 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698