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

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

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 #ifndef COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ 5 #ifndef COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_
6 #define COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ 6 #define COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // the current page is 'safe'. 54 // the current page is 'safe'.
55 virtual void LogPauseDelay(base::TimeDelta time); 55 virtual void LogPauseDelay(base::TimeDelta time);
56 56
57 // This is a no-op in the base class, but should be overridden to send threat 57 // This is a no-op in the base class, but should be overridden to send threat
58 // details. Called on the IO thread by the ThreatDetails with the serialized 58 // details. Called on the IO thread by the ThreatDetails with the serialized
59 // protocol buffer. 59 // protocol buffer.
60 virtual void SendSerializedThreatDetails(const std::string& serialized); 60 virtual void SendSerializedThreatDetails(const std::string& serialized);
61 61
62 // This is a no-op in the base class, but should be overridden to report hits 62 // This is a no-op in the base class, but should be overridden to report hits
63 // to the unsafe contents (malware, phishing, unsafe download URL) 63 // to the unsafe contents (malware, phishing, unsafe download URL)
64 // to the server. Can only be called on UI thread. 64 // to the server. Can only be called on UI thread.
vakh (use Gerrit instead) 2017/05/19 22:41:13 Please update this comment also to include the Inc
mortonm 2017/05/22 17:03:59 Done.
65 virtual void MaybeReportSafeBrowsingHit( 65 virtual void MaybeReportSafeBrowsingHit(
66 const safe_browsing::HitReport& hit_report); 66 const safe_browsing::HitReport& hit_report,
67 content::WebContents* web_contents);
67 68
68 // A convenience wrapper method for IsUrlWhitelistedOrPendingForWebContents. 69 // A convenience wrapper method for IsUrlWhitelistedOrPendingForWebContents.
69 virtual bool IsWhitelisted(const UnsafeResource& resource); 70 virtual bool IsWhitelisted(const UnsafeResource& resource);
70 71
71 // Checks if we already displayed or are displaying an interstitial 72 // Checks if we already displayed or are displaying an interstitial
72 // for the top-level site |url| in a given WebContents. If 73 // for the top-level site |url| in a given WebContents. If
73 // |whitelist_only|, it returns true only if the user chose to ignore 74 // |whitelist_only|, it returns true only if the user chose to ignore
74 // the interstitial. Otherwise, it returns true if an interstitial for 75 // the interstitial. Otherwise, it returns true if an interstitial for
75 // |url| is already displaying *or* if the user has seen an 76 // |url| is already displaying *or* if the user has seen an
76 // interstitial for |url| before in this WebContents and proceeded 77 // interstitial for |url| before in this WebContents and proceeded
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 147
147 private: 148 private:
148 friend class base::RefCountedThreadSafe<BaseUIManager>; 149 friend class base::RefCountedThreadSafe<BaseUIManager>;
149 150
150 DISALLOW_COPY_AND_ASSIGN(BaseUIManager); 151 DISALLOW_COPY_AND_ASSIGN(BaseUIManager);
151 }; 152 };
152 153
153 } // namespace safe_browsing 154 } // namespace safe_browsing
154 155
155 #endif // COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ 156 #endif // COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698