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

Side by Side Diff: components/safe_browsing/base_ui_manager.cc

Issue 2886043002: Refrain from sending hit report when user is in incognito mode (Closed)
Patch Set: fixed comment typo Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/safe_browsing/base_ui_manager.h" 5 #include "components/safe_browsing/base_ui_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 return; 237 return;
238 } 238 }
239 239
240 void BaseUIManager::CreateAndSendHitReport(const UnsafeResource& resource) {} 240 void BaseUIManager::CreateAndSendHitReport(const UnsafeResource& resource) {}
241 241
242 void BaseUIManager::ShowBlockingPageForResource( 242 void BaseUIManager::ShowBlockingPageForResource(
243 const UnsafeResource& resource) { 243 const UnsafeResource& resource) {
244 BaseBlockingPage::ShowBlockingPage(this, resource); 244 BaseBlockingPage::ShowBlockingPage(this, resource);
245 } 245 }
246 246
247 // A safebrowsing hit is sent after a blocking page for malware/phishing 247 // A safebrowsing hit is sent after a blocking page for malware/phishing
vakh (use Gerrit instead) 2017/05/19 22:41:13 nit: SafeBrowsing
mortonm 2017/05/22 17:03:59 Done.
248 // or after the warning dialog for download urls, only for 248 // or after the warning dialog for download urls, only for extended_reporting
249 // UMA || extended_reporting users. 249 // users who are not in incognito mode.
250 void BaseUIManager::MaybeReportSafeBrowsingHit( 250 void BaseUIManager::MaybeReportSafeBrowsingHit(
251 const HitReport& hit_report) { 251 const HitReport& hit_report,
252 content::WebContents* web_contents) {
252 DCHECK_CURRENTLY_ON(BrowserThread::UI); 253 DCHECK_CURRENTLY_ON(BrowserThread::UI);
253 return; 254 return;
254 } 255 }
255 256
256 void BaseUIManager::ReportSafeBrowsingHitOnIOThread( 257 void BaseUIManager::ReportSafeBrowsingHitOnIOThread(
257 const HitReport& hit_report) { 258 const HitReport& hit_report) {
258 DCHECK_CURRENTLY_ON(BrowserThread::IO); 259 DCHECK_CURRENTLY_ON(BrowserThread::IO);
259 return; 260 return;
260 } 261 }
261 262
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 if (resource.is_subresource) { 353 if (resource.is_subresource) {
353 NavigationEntry* entry = resource.GetNavigationEntryForResource(); 354 NavigationEntry* entry = resource.GetNavigationEntryForResource();
354 if (!entry) 355 if (!entry)
355 return GURL(); 356 return GURL();
356 return entry->GetURL().GetWithEmptyPath(); 357 return entry->GetURL().GetWithEmptyPath();
357 } 358 }
358 return resource.url.GetWithEmptyPath(); 359 return resource.url.GetWithEmptyPath();
359 } 360 }
360 361
361 } // namespace safe_browsing 362 } // namespace safe_browsing
OLDNEW
« components/safe_browsing/base_ui_manager.h ('K') | « components/safe_browsing/base_ui_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698