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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.h

Issue 572163002: Deprecate Safe Browsing timing histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 3 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/safe_browsing_blocking_page.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 (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 // Classes for managing the SafeBrowsing interstitial pages. 5 // Classes for managing the SafeBrowsing interstitial pages.
6 // 6 //
7 // When a user is about to visit a page the SafeBrowsing system has deemed to 7 // When a user is about to visit a page the SafeBrowsing system has deemed to
8 // be malicious, either as malware or a phishing page, we show an interstitial 8 // be malicious, either as malware or a phishing page, we show an interstitial
9 // page with some options (go back, continue) to give the user a chance to avoid 9 // page with some options (go back, continue) to give the user a chance to avoid
10 // the harmful page. 10 // the harmful page.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 SHOW_ADVANCED, 132 SHOW_ADVANCED,
133 }; 133 };
134 134
135 // Records a user action for this interstitial, using the form 135 // Records a user action for this interstitial, using the form
136 // SBInterstitial[Phishing|Malware|Multiple][Show|Proceed|DontProceed]. 136 // SBInterstitial[Phishing|Malware|Multiple][Show|Proceed|DontProceed].
137 void RecordUserAction(BlockingPageEvent event); 137 void RecordUserAction(BlockingPageEvent event);
138 138
139 // Used to query the HistoryService to see if the URL is in history. For UMA. 139 // Used to query the HistoryService to see if the URL is in history. For UMA.
140 void OnGotHistoryCount(bool success, int num_visits, base::Time first_visit); 140 void OnGotHistoryCount(bool success, int num_visits, base::Time first_visit);
141 141
142 // Records the time it took for the user to react to the
143 // interstitial. We won't double-count if this method is called
144 // multiple times.
145 void RecordUserReactionTime(const std::string& command);
146
147 // Checks if we should even show the malware details option. For example, we 142 // Checks if we should even show the malware details option. For example, we
148 // don't show it in incognito mode. 143 // don't show it in incognito mode.
149 bool CanShowMalwareDetailsOption(); 144 bool CanShowMalwareDetailsOption();
150 145
151 // Called when the insterstitial is going away. If there is a 146 // Called when the insterstitial is going away. If there is a
152 // pending malware details object, we look at the user's 147 // pending malware details object, we look at the user's
153 // preferences, and if the option to send malware details is 148 // preferences, and if the option to send malware details is
154 // enabled, the report is scheduled to be sent on the |ui_manager_|. 149 // enabled, the report is scheduled to be sent on the |ui_manager_|.
155 void FinishMalwareDetails(int64 delay_ms); 150 void FinishMalwareDetails(int64 delay_ms);
156 151
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // blocking page is shown. The object will be sent when the warning 192 // blocking page is shown. The object will be sent when the warning
198 // is gone (if the user enables the feature). 193 // is gone (if the user enables the feature).
199 scoped_refptr<MalwareDetails> malware_details_; 194 scoped_refptr<MalwareDetails> malware_details_;
200 195
201 bool proceeded_; 196 bool proceeded_;
202 197
203 content::WebContents* web_contents_; 198 content::WebContents* web_contents_;
204 GURL url_; 199 GURL url_;
205 content::InterstitialPage* interstitial_page_; // Owns us 200 content::InterstitialPage* interstitial_page_; // Owns us
206 201
207 // Time when the interstitial was show. This variable is set in
208 // GetHTMLContents() which is called right before the interstitial
209 // is shown to the user. Will return is_null() once we reported the
210 // user action.
211 base::TimeTicks interstitial_show_time_;
212
213 // Whether the user has expanded the "see more" section of the page already
214 // during this interstitial page.
215 bool has_expanded_see_more_section_;
216
217 // Whether the interstitial should create a view. 202 // Whether the interstitial should create a view.
218 bool create_view_; 203 bool create_view_;
219 204
220 // Which type of interstitial this is. 205 // Which type of interstitial this is.
221 enum { 206 enum {
222 TYPE_MALWARE, 207 TYPE_MALWARE,
223 TYPE_PHISHING, 208 TYPE_PHISHING,
224 } interstitial_type_; 209 } interstitial_type_;
225 210
226 // The factory used to instantiate SafeBrowsingBlockingPage objects. 211 // The factory used to instantiate SafeBrowsingBlockingPage objects.
(...skipping 23 matching lines...) Expand all
250 public: 235 public:
251 virtual ~SafeBrowsingBlockingPageFactory() { } 236 virtual ~SafeBrowsingBlockingPageFactory() { }
252 237
253 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( 238 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage(
254 SafeBrowsingUIManager* ui_manager, 239 SafeBrowsingUIManager* ui_manager,
255 content::WebContents* web_contents, 240 content::WebContents* web_contents,
256 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; 241 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0;
257 }; 242 };
258 243
259 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ 244 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698