OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
| 10 #include <vector> |
10 | 11 |
| 12 #include "base/string16.h" |
11 #include "chrome/browser/ssl/ssl_error_info.h" | 13 #include "chrome/browser/ssl/ssl_error_info.h" |
12 #include "chrome/browser/tab_contents/interstitial_page.h" | 14 #include "chrome/browser/tab_contents/interstitial_page.h" |
13 | 15 |
14 class DictionaryValue; | 16 class DictionaryValue; |
15 class SSLCertErrorHandler; | 17 class SSLCertErrorHandler; |
16 | 18 |
17 // This class is responsible for showing/hiding the interstitial page that is | 19 // This class is responsible for showing/hiding the interstitial page that is |
18 // shown when a certificate error happens. | 20 // shown when a certificate error happens. |
19 // It deletes itself when the interstitial page is closed. | 21 // It deletes itself when the interstitial page is closed. |
20 class SSLBlockingPage : public InterstitialPage { | 22 class SSLBlockingPage : public InterstitialPage { |
(...skipping 25 matching lines...) Expand all Loading... |
46 | 48 |
47 SSLBlockingPage(SSLCertErrorHandler* handler, Delegate* delegate, | 49 SSLBlockingPage(SSLCertErrorHandler* handler, Delegate* delegate, |
48 ErrorLevel error_level); | 50 ErrorLevel error_level); |
49 virtual ~SSLBlockingPage(); | 51 virtual ~SSLBlockingPage(); |
50 | 52 |
51 // A method that sets strings in the specified dictionary from the passed | 53 // A method that sets strings in the specified dictionary from the passed |
52 // vector so that they can be used to resource the ssl_roadblock.html/ | 54 // vector so that they can be used to resource the ssl_roadblock.html/ |
53 // ssl_error.html files. | 55 // ssl_error.html files. |
54 // Note: there can be up to 5 strings in |extra_info|. | 56 // Note: there can be up to 5 strings in |extra_info|. |
55 static void SetExtraInfo(DictionaryValue* strings, | 57 static void SetExtraInfo(DictionaryValue* strings, |
56 const std::vector<std::wstring>& extra_info); | 58 const std::vector<string16>& extra_info); |
57 | 59 |
58 protected: | 60 protected: |
59 // InterstitialPage implementation. | 61 // InterstitialPage implementation. |
60 virtual std::string GetHTMLContents(); | 62 virtual std::string GetHTMLContents(); |
61 virtual void CommandReceived(const std::string& command); | 63 virtual void CommandReceived(const std::string& command); |
62 virtual void UpdateEntry(NavigationEntry* entry); | 64 virtual void UpdateEntry(NavigationEntry* entry); |
63 virtual void Proceed(); | 65 virtual void Proceed(); |
64 virtual void DontProceed(); | 66 virtual void DontProceed(); |
65 | 67 |
66 private: | 68 private: |
(...skipping 11 matching lines...) Expand all Loading... |
78 // A flag to indicate if we've notified |delegate_| of the user's decision. | 80 // A flag to indicate if we've notified |delegate_| of the user's decision. |
79 bool delegate_has_been_notified_; | 81 bool delegate_has_been_notified_; |
80 | 82 |
81 // Is the certificate error overridable or fatal? | 83 // Is the certificate error overridable or fatal? |
82 ErrorLevel error_level_; | 84 ErrorLevel error_level_; |
83 | 85 |
84 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 86 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
85 }; | 87 }; |
86 | 88 |
87 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 89 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
OLD | NEW |