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

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

Issue 2950863002: Implement code for Start/Finish threat details collection in WebView. (Closed)
Patch Set: fix comment Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_BLOCKING_PAGE_H_ 5 #ifndef COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_
6 #define COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_ 6 #define COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/safe_browsing/base_ui_manager.h" 13 #include "components/safe_browsing/base_ui_manager.h"
14 #include "components/safe_browsing_db/v4_protocol_manager_util.h"
14 #include "components/security_interstitials/content/security_interstitial_page.h " 15 #include "components/security_interstitials/content/security_interstitial_page.h "
15 #include "components/security_interstitials/core/base_safe_browsing_error_ui.h" 16 #include "components/security_interstitials/core/base_safe_browsing_error_ui.h"
16 #include "components/security_interstitials/core/metrics_helper.h" 17 #include "components/security_interstitials/core/metrics_helper.h"
17 #include "content/public/browser/interstitial_page_delegate.h" 18 #include "content/public/browser/interstitial_page_delegate.h"
18 #include "url/gurl.h" 19 #include "url/gurl.h"
19 20
20 namespace safe_browsing { 21 namespace safe_browsing {
21 22
22 // Base class for managing the SafeBrowsing interstitial pages. 23 // Base class for managing the SafeBrowsing interstitial pages.
23 class BaseBlockingPage 24 class BaseBlockingPage
(...skipping 21 matching lines...) Expand all
45 46
46 // Returns true if the passed |unsafe_resources| is blocking the load of 47 // Returns true if the passed |unsafe_resources| is blocking the load of
47 // the main page. 48 // the main page.
48 static bool IsMainPageLoadBlocked(const UnsafeResourceList& unsafe_resources); 49 static bool IsMainPageLoadBlocked(const UnsafeResourceList& unsafe_resources);
49 50
50 // InterstitialPageDelegate methods: 51 // InterstitialPageDelegate methods:
51 void OnProceed() override; 52 void OnProceed() override;
52 void OnDontProceed() override; 53 void OnDontProceed() override;
53 void CommandReceived(const std::string& command) override; 54 void CommandReceived(const std::string& command) override;
54 55
56 // Checks the threat type to decide if we should report ThreatDetails.
57 static bool ShouldReportThreatDetails(SBThreatType threat_type);
58
55 protected: 59 protected:
56 // Don't instantiate this class directly, use ShowBlockingPage instead. 60 // Don't instantiate this class directly, use ShowBlockingPage instead.
57 BaseBlockingPage( 61 BaseBlockingPage(
58 BaseUIManager* ui_manager, 62 BaseUIManager* ui_manager,
59 content::WebContents* web_contents, 63 content::WebContents* web_contents,
60 const GURL& main_frame_url, 64 const GURL& main_frame_url,
61 const UnsafeResourceList& unsafe_resources, 65 const UnsafeResourceList& unsafe_resources,
62 std::unique_ptr< 66 std::unique_ptr<
63 security_interstitials::SecurityInterstitialControllerClient> 67 security_interstitials::SecurityInterstitialControllerClient>
64 controller_client, 68 controller_client,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 150
147 // For displaying safe browsing interstitial. 151 // For displaying safe browsing interstitial.
148 std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui_; 152 std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui_;
149 153
150 DISALLOW_COPY_AND_ASSIGN(BaseBlockingPage); 154 DISALLOW_COPY_AND_ASSIGN(BaseBlockingPage);
151 }; 155 };
152 156
153 } // namespace safe_browsing 157 } // namespace safe_browsing
154 158
155 #endif // COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_ 159 #endif // COMPONENTS_SAFE_BROWSING_BASE_BLOCKING_PAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page.cc ('k') | components/safe_browsing/base_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698