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

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

Issue 1551583002: [gcc_build_error] Fix for multiple friend decl of MalwareReportsToggling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | 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 // 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // Checks the threat type to decide if we should report ThreatDetails. 95 // Checks the threat type to decide if we should report ThreatDetails.
96 static bool ShouldReportThreatDetails(SBThreatType threat_type); 96 static bool ShouldReportThreatDetails(SBThreatType threat_type);
97 97
98 protected: 98 protected:
99 friend class SafeBrowsingBlockingPageTest; 99 friend class SafeBrowsingBlockingPageTest;
100 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, 100 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
101 ProceedThenDontProceed); 101 ProceedThenDontProceed);
102 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, 102 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
103 MalwareReportsDisabled); 103 MalwareReportsDisabled);
104 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, 104 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
105 MalwareReportsTransitionDisabled);
mattm 2015/12/28 17:56:30 MalwareReportsTransitionDisabled test doesn't seem
RaviKasibhatla 2015/12/29 05:35:07 Done.
106 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
105 MalwareReportsToggling); 107 MalwareReportsToggling);
106 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest, 108 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
107 ExtendedReportingNotShownOnSecurePage); 109 ExtendedReportingNotShownOnSecurePage);
108 FRIEND_TEST_ALL_PREFIXES( 110 FRIEND_TEST_ALL_PREFIXES(
109 SafeBrowsingBlockingPageTest, 111 SafeBrowsingBlockingPageTest,
110 ExtendedReportingNotShownOnSecurePageWithSecureSubresource); 112 ExtendedReportingNotShownOnSecurePageWithSecureSubresource);
111 FRIEND_TEST_ALL_PREFIXES( 113 FRIEND_TEST_ALL_PREFIXES(
112 SafeBrowsingBlockingPageTest, 114 SafeBrowsingBlockingPageTest,
113 ExtendedReportingNotShownOnSecurePageWithInsecureSubresource); 115 ExtendedReportingNotShownOnSecurePageWithInsecureSubresource);
114 FRIEND_TEST_ALL_PREFIXES( 116 FRIEND_TEST_ALL_PREFIXES(
(...skipping 16 matching lines...) Expand all
131 void PopulateInterstitialStrings( 133 void PopulateInterstitialStrings(
132 base::DictionaryValue* load_time_data) override; 134 base::DictionaryValue* load_time_data) override;
133 void AfterShow() override {} 135 void AfterShow() override {}
134 136
135 // After a safe browsing interstitial where the user opted-in to the 137 // After a safe browsing interstitial where the user opted-in to the
136 // report but clicked "proceed anyway", we delay the call to 138 // report but clicked "proceed anyway", we delay the call to
137 // ThreatDetails::FinishCollection() by this much time (in 139 // ThreatDetails::FinishCollection() by this much time (in
138 // milliseconds), in order to get data from the blocked resource itself. 140 // milliseconds), in order to get data from the blocked resource itself.
139 int64_t malware_details_proceed_delay_ms_; 141 int64_t malware_details_proceed_delay_ms_;
140 142
141 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
142 MalwareReportsTransitionDisabled);
143 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingBlockingPageTest,
144 MalwareReportsToggling);
145
146 // Checks if we should even show the threat details option. For example, we 143 // Checks if we should even show the threat details option. For example, we
147 // don't show it in incognito mode. 144 // don't show it in incognito mode.
148 bool CanShowThreatDetailsOption(); 145 bool CanShowThreatDetailsOption();
149 146
150 // Called when the insterstitial is going away. If there is a 147 // Called when the insterstitial is going away. If there is a
151 // pending threat details object, we look at the user's 148 // pending threat details object, we look at the user's
152 // preferences, and if the option to send threat details is 149 // preferences, and if the option to send threat details is
153 // enabled, the report is scheduled to be sent on the |ui_manager_|. 150 // enabled, the report is scheduled to be sent on the |ui_manager_|.
154 void FinishThreatDetails(int64_t delay_ms, bool did_proceed, int num_visits); 151 void FinishThreatDetails(int64_t delay_ms, bool did_proceed, int num_visits);
155 152
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( 224 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage(
228 SafeBrowsingUIManager* ui_manager, 225 SafeBrowsingUIManager* ui_manager,
229 content::WebContents* web_contents, 226 content::WebContents* web_contents,
230 const GURL& main_frame_url, 227 const GURL& main_frame_url,
231 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; 228 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0;
232 }; 229 };
233 230
234 } // namespace safe_browsing 231 } // namespace safe_browsing
235 232
236 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ 233 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_
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