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

Side by Side Diff: chrome/browser/ssl/ssl_blocking_page.h

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « chrome/browser/ssl/ssl_add_certificate.cc ('k') | chrome/browser/ssl/ssl_browser_tests.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 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 5 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 CMD_HELP = 4, 50 CMD_HELP = 4,
51 CMD_CLOCK = 5 51 CMD_CLOCK = 5
52 }; 52 };
53 53
54 enum SSLBlockingPageOptionsMask { 54 enum SSLBlockingPageOptionsMask {
55 OVERRIDABLE = 1 << 0, 55 OVERRIDABLE = 1 << 0,
56 STRICT_ENFORCEMENT = 1 << 1, 56 STRICT_ENFORCEMENT = 1 << 1,
57 EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 2 57 EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 2
58 }; 58 };
59 59
60 virtual ~SSLBlockingPage(); 60 ~SSLBlockingPage() override;
61 61
62 // Create an interstitial and show it. 62 // Create an interstitial and show it.
63 void Show(); 63 void Show();
64 64
65 // Creates an SSL blocking page. If the blocking page isn't shown, the caller 65 // Creates an SSL blocking page. If the blocking page isn't shown, the caller
66 // is responsible for cleaning up the blocking page, otherwise the 66 // is responsible for cleaning up the blocking page, otherwise the
67 // interstitial takes ownership when shown. |options_mask| must be a bitwise 67 // interstitial takes ownership when shown. |options_mask| must be a bitwise
68 // mask of SSLBlockingPageOptionsMask values. 68 // mask of SSLBlockingPageOptionsMask values.
69 SSLBlockingPage(content::WebContents* web_contents, 69 SSLBlockingPage(content::WebContents* web_contents,
70 int cert_error, 70 int cert_error,
71 const net::SSLInfo& ssl_info, 71 const net::SSLInfo& ssl_info,
72 const GURL& request_url, 72 const GURL& request_url,
73 int options_mask, 73 int options_mask,
74 const base::Callback<void(bool)>& callback); 74 const base::Callback<void(bool)>& callback);
75 75
76 // A method that sets strings in the specified dictionary from the passed 76 // A method that sets strings in the specified dictionary from the passed
77 // vector so that they can be used to resource the ssl_roadblock.html/ 77 // vector so that they can be used to resource the ssl_roadblock.html/
78 // ssl_error.html files. 78 // ssl_error.html files.
79 // Note: there can be up to 5 strings in |extra_info|. 79 // Note: there can be up to 5 strings in |extra_info|.
80 static void SetExtraInfo(base::DictionaryValue* strings, 80 static void SetExtraInfo(base::DictionaryValue* strings,
81 const std::vector<base::string16>& extra_info); 81 const std::vector<base::string16>& extra_info);
82 82
83 protected: 83 protected:
84 // InterstitialPageDelegate implementation. 84 // InterstitialPageDelegate implementation.
85 virtual std::string GetHTMLContents() override; 85 std::string GetHTMLContents() override;
86 virtual void CommandReceived(const std::string& command) override; 86 void CommandReceived(const std::string& command) override;
87 virtual void OverrideEntry(content::NavigationEntry* entry) override; 87 void OverrideEntry(content::NavigationEntry* entry) override;
88 virtual void OverrideRendererPrefs( 88 void OverrideRendererPrefs(content::RendererPreferences* prefs) override;
89 content::RendererPreferences* prefs) override; 89 void OnProceed() override;
90 virtual void OnProceed() override; 90 void OnDontProceed() override;
91 virtual void OnDontProceed() override;
92 91
93 private: 92 private:
94 void NotifyDenyCertificate(); 93 void NotifyDenyCertificate();
95 void NotifyAllowCertificate(); 94 void NotifyAllowCertificate();
96 95
97 // Used to query the HistoryService to see if the URL is in history. For UMA. 96 // Used to query the HistoryService to see if the URL is in history. For UMA.
98 void OnGotHistoryCount(bool success, int num_visits, base::Time first_visit); 97 void OnGotHistoryCount(bool success, int num_visits, base::Time first_visit);
99 98
100 base::Callback<void(bool)> callback_; 99 base::Callback<void(bool)> callback_;
101 100
(...skipping 22 matching lines...) Expand all
124 // For Chrome Experience Sampling Platform: this maintains event state. 123 // For Chrome Experience Sampling Platform: this maintains event state.
125 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; 124 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_;
126 #endif 125 #endif
127 126
128 content::NotificationRegistrar registrar_; 127 content::NotificationRegistrar registrar_;
129 128
130 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); 129 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage);
131 }; 130 };
132 131
133 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ 132 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_add_certificate.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698