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

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

Issue 2585463002: Correct comment about extended-reporting hits. (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/safe_browsing/ui_manager.h" 5 #include "chrome/browser/safe_browsing/ui_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/debug/leak_tracker.h" 10 #include "base/debug/leak_tracker.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 268 }
269 AddToWhitelistUrlSet(GetMainFrameWhitelistUrlForResource(resource), 269 AddToWhitelistUrlSet(GetMainFrameWhitelistUrlForResource(resource),
270 resource.web_contents_getter.Run(), 270 resource.web_contents_getter.Run(),
271 true /* A decision is now pending */, 271 true /* A decision is now pending */,
272 resource.threat_type); 272 resource.threat_type);
273 SafeBrowsingBlockingPage::ShowBlockingPage(this, resource); 273 SafeBrowsingBlockingPage::ShowBlockingPage(this, resource);
274 } 274 }
275 275
276 // A safebrowsing hit is sent after a blocking page for malware/phishing 276 // A safebrowsing hit is sent after a blocking page for malware/phishing
277 // or after the warning dialog for download urls, only for 277 // or after the warning dialog for download urls, only for
278 // UMA || extended_reporting users. 278 // extended-reporting users.
279 void SafeBrowsingUIManager::MaybeReportSafeBrowsingHit( 279 void SafeBrowsingUIManager::MaybeReportSafeBrowsingHit(
280 const HitReport& hit_report) { 280 const HitReport& hit_report) {
281 DCHECK_CURRENTLY_ON(BrowserThread::UI); 281 DCHECK_CURRENTLY_ON(BrowserThread::UI);
282 282
283 // Send report if user opted-in extended reporting. 283 // Send report if user opted-in extended reporting.
284 if (hit_report.extended_reporting_level != SBER_LEVEL_OFF) { 284 if (hit_report.extended_reporting_level != SBER_LEVEL_OFF) {
285 BrowserThread::PostTask( 285 BrowserThread::PostTask(
286 BrowserThread::IO, FROM_HERE, 286 BrowserThread::IO, FROM_HERE,
287 base::Bind(&SafeBrowsingUIManager::ReportSafeBrowsingHitOnIOThread, 287 base::Bind(&SafeBrowsingUIManager::ReportSafeBrowsingHitOnIOThread,
288 this, hit_report)); 288 this, hit_report));
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 } 487 }
488 } 488 }
489 489
490 // Static. 490 // Static.
491 GURL SafeBrowsingUIManager::GetMainFrameWhitelistUrlForResourceForTesting( 491 GURL SafeBrowsingUIManager::GetMainFrameWhitelistUrlForResourceForTesting(
492 const security_interstitials::UnsafeResource& resource) { 492 const security_interstitials::UnsafeResource& resource) {
493 return GetMainFrameWhitelistUrlForResource(resource); 493 return GetMainFrameWhitelistUrlForResource(resource);
494 } 494 }
495 495
496 } // namespace safe_browsing 496 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698