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