diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 18:04:26 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-12 18:04:26 +0000 |
commit | c83203d27e7f79bc395d1702b1a7fcaecc65c23c (patch) | |
tree | 139f6a247b140bb02daeccda90f54222680a4261 | |
parent | a9afddb80f3aa7703681e02f7161d040e77c7be7 (diff) | |
download | chromium_src-c83203d27e7f79bc395d1702b1a7fcaecc65c23c.zip chromium_src-c83203d27e7f79bc395d1702b1a7fcaecc65c23c.tar.gz chromium_src-c83203d27e7f79bc395d1702b1a7fcaecc65c23c.tar.bz2 |
Revert "Add chrome/browser/ssl/ssl_manager.cc to the build."
This reverts commit 9656.
Review URL: http://codereview.chromium.org/20308
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9672 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.scons | 1 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_manager.cc | 29 | ||||
-rw-r--r-- | chrome/browser/tab_contents/navigation_controller.h | 3 | ||||
-rw-r--r-- | chrome/chrome.xcodeproj/project.pbxproj | 2 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 19 | ||||
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.h | 93 |
6 files changed, 56 insertions, 91 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons index a777b0a..94eed65 100644 --- a/chrome/browser/browser.scons +++ b/chrome/browser/browser.scons @@ -746,6 +746,7 @@ if not env.Bit('windows'): 'sessions/session_restore.cc', 'shell_integration.cc', 'ssl/ssl_blocking_page.cc', + 'ssl/ssl_manager.cc', 'ssl/ssl_policy.cc', 'tab_contents/infobar_delegate.cc', 'tab_contents/interstitial_page.cc', diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc index 1a81fd4..60bae45 100644 --- a/chrome/browser/ssl/ssl_manager.cc +++ b/chrome/browser/ssl/ssl_manager.cc @@ -8,13 +8,17 @@ #include "base/string_util.h" #include "grit/theme_resources.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/load_notification_details.h" #include "chrome/browser/load_from_memory_cache_details.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/resource_request_details.h" #include "chrome/browser/ssl/ssl_error_info.h" +#include "chrome/browser/ssl/ssl_policy.h" +#include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/provisional_load_details.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/browser/tab_contents/web_contents.h" #include "chrome/common/l10n_util.h" @@ -22,25 +26,14 @@ #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "chrome/common/resource_bundle.h" +#include "chrome/views/decision.h" +#include "chrome/views/link.h" #include "net/base/cert_status_flags.h" #include "net/base/net_errors.h" #include "net/url_request/url_request.h" #include "webkit/glue/resource_type.h" #include "generated_resources.h" -#if defined(OS_WIN) -// TODO(port): Port these files. -#include "chrome/browser/load_notification_details.h" -#include "chrome/browser/ssl/ssl_policy.h" -#include "chrome/browser/tab_contents/infobar_delegate.h" -#include "chrome/browser/tab_contents/tab_contents.h" -#include "chrome/views/decision.h" -#include "chrome/views/link.h" -#else -#include "chrome/common/temp_scaffolding_stubs.h" -#endif - - class SSLInfoBarDelegate : public ConfirmInfoBarDelegate { public: SSLInfoBarDelegate(TabContents* contents, @@ -100,8 +93,8 @@ void SSLManager::RegisterUserPrefs(PrefService* prefs) { } SSLManager::SSLManager(NavigationController* controller, Delegate* delegate) - : delegate_(delegate), - controller_(controller) { + : controller_(controller), + delegate_(delegate) { DCHECK(controller_); // If do delegate is supplied, use the default policy. @@ -239,10 +232,10 @@ SSLManager::ErrorHandler::ErrorHandler(ResourceDispatcherHost* rdh, : ui_loop_(ui_loop), io_loop_(MessageLoop::current()), manager_(NULL), - request_id_(0, 0), resource_dispatcher_host_(rdh), - request_url_(request->url()), - request_has_been_notified_(false) { + request_has_been_notified_(false), + request_id_(0, 0), + request_url_(request->url()) { DCHECK(MessageLoop::current() != ui_loop); ResourceDispatcherHost::ExtraRequestInfo* info = diff --git a/chrome/browser/tab_contents/navigation_controller.h b/chrome/browser/tab_contents/navigation_controller.h index d84e563..f39c595 100644 --- a/chrome/browser/tab_contents/navigation_controller.h +++ b/chrome/browser/tab_contents/navigation_controller.h @@ -12,13 +12,14 @@ #if defined(OS_POSIX) // TODO(port): remove when dependent classes are ported #include "chrome/common/temp_scaffolding_stubs.h" +#elif defined(OS_WIN) +#include "chrome/browser/ssl/ssl_manager.h" #endif #include "base/linked_ptr.h" #include "base/ref_counted.h" #include "googleurl/src/gurl.h" #include "chrome/browser/sessions/session_id.h" -#include "chrome/browser/ssl/ssl_manager.h" #include "chrome/browser/tab_contents/tab_contents_type.h" #include "chrome/common/navigation_types.h" #include "chrome/common/page_transition_types.h" diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj index b34a721..81d9157 100644 --- a/chrome/chrome.xcodeproj/project.pbxproj +++ b/chrome/chrome.xcodeproj/project.pbxproj @@ -124,7 +124,6 @@ 406DFE278638D6132B21B2C9 /* url_pattern.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6447F24FADC63E58A44DB762 /* url_pattern.cc */; }; 423A79243BC7B7C0B1E9B97A /* session_service.cc in Sources */ = {isa = PBXBuildFile; fileRef = C8D26D9EC81E03E91E270463 /* session_service.cc */; }; 475CAF858604B413561740C1 /* cache_manager_host.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF8520E9D4839009A6919 /* cache_manager_host.cc */; }; - 486456FF9CB2AA650DB9FE26 /* ssl_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = B5D16ECC0F21451600861FAC /* ssl_manager.cc */; }; 49C8AD19AA0094034F59B6F0 /* user_script.cc in Sources */ = {isa = PBXBuildFile; fileRef = 699499C4FBA07FB2D7B298A2 /* user_script.cc */; }; 4D175916B2FC058793051209 /* chrome_paths_mac.cc in Sources */ = {isa = PBXBuildFile; fileRef = C18F2A0A6FB6BEF75406511D /* chrome_paths_mac.cc */; }; 4D1F59FE0F2A6BBB0040C1E3 /* image_diff.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D1F59FD0F2A6BBB0040C1E3 /* image_diff.cc */; }; @@ -5386,7 +5385,6 @@ 4D7BFA2D0E9D4910009A6919 /* snippet.cc in Sources */, E45075FA0F150C28003BE099 /* spellcheck_worditerator.cc in Sources */, F775995035B63E51251B0922 /* ssl_error_info.cc in Sources */, - 486456FF9CB2AA650DB9FE26 /* ssl_manager.cc in Sources */, E4F3245D0EE5CFDF002533CE /* starred_url_database.cc in Sources */, E45075EE0F150ABA003BE099 /* sync_resource_handler.cc in Sources */, E455DDBA0F3227A600DD4383 /* tab_cell.mm in Sources */, diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index fb9180d..9c1a27f 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -340,6 +340,20 @@ void RunBeforeUnloadDialog(WebContents* web_contents, NOTIMPLEMENTED(); } +bool SSLManager::DeserializeSecurityInfo(const std::string&, int*, int*, int*) { + NOTIMPLEMENTED(); + return false; +} + +void SSLManager::OnSSLCertificateError( + ResourceDispatcherHost* resource_dispatcher, + URLRequest* request, + int cert_error, + net::X509Certificate* cert, + MessageLoop* ui_loop) { + NOTIMPLEMENTED(); +} + //-------------------------------------------------------------------------- void RunRepostFormWarningDialog(NavigationController*) { @@ -417,11 +431,6 @@ void DebuggerShell::ProcessCommand(const std::wstring& data) { } #endif // !CHROME_DEBUGGER_DISABLED -SSLPolicy* SSLPolicy::GetDefaultPolicy() { - NOTIMPLEMENTED(); - return NULL; -} - void HistoryURLProvider::ExecuteWithDB(history::HistoryBackend*, history::URLDatabase*, HistoryURLProviderParams*) { diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h index c6b9f28..1f17cc9 100644 --- a/chrome/common/temp_scaffolding_stubs.h +++ b/chrome/common/temp_scaffolding_stubs.h @@ -32,8 +32,6 @@ #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/sessions/session_id.h" -#include "chrome/browser/ssl/ssl_error_info.h" -#include "chrome/browser/ssl/ssl_manager.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/page_navigator.h" #include "chrome/browser/tab_contents/tab_contents_type.h" @@ -983,6 +981,34 @@ class ConstrainedWindow { void CloseConstrainedWindow() { NOTIMPLEMENTED(); } }; +class SSLManager { + public: + class Delegate { + public: + }; + SSLManager(NavigationController* controller, Delegate* delegate) { + NOTIMPLEMENTED(); + } + ~SSLManager() { } + void NavigationStateChanged() { NOTIMPLEMENTED(); } + static bool DeserializeSecurityInfo(const std::string&, int*, int*, int*); + static void OnSSLCertificateError(ResourceDispatcherHost* rdh, + URLRequest* request, + int cert_error, + net::X509Certificate* cert, + MessageLoop* ui_loop); + static std::string SerializeSecurityInfo(int cert_id, + int cert_status, + int security_bits) { + NOTIMPLEMENTED(); + return std::string(); + } + static void OnMixedContentRequest(ResourceDispatcherHost* rdh, + URLRequest* request, + MessageLoop* ui_loop) { NOTIMPLEMENTED(); } + void OnMixedContent(MixedContentHandler* mixed_content) { NOTIMPLEMENTED(); } +}; + class ModalHtmlDialogDelegate { public: ModalHtmlDialogDelegate(const GURL&, int, int, const std::string&, @@ -1048,67 +1074,4 @@ class RepostFormWarningDialog { virtual ~RepostFormWarningDialog() { } }; -class SSLBlockingPage : public InterstitialPage { - public: - class Delegate { - public: - virtual SSLErrorInfo GetSSLErrorInfo(SSLManager::CertError* error) = 0; - virtual void OnDenyCertificate(SSLManager::CertError* error) = 0; - virtual void OnAllowCertificate(SSLManager::CertError* error) = 0; - }; - - SSLBlockingPage(SSLManager::CertError* error, Delegate* delegate); - virtual ~SSLBlockingPage(); - - static void SetExtraInfo(DictionaryValue* strings, - const std::vector<std::wstring>& extra_info); - - protected: - virtual std::string GetHTMLContents(); - virtual void CommandReceived(const std::string& command); - virtual void UpdateEntry(NavigationEntry* entry); - virtual void Proceed(); - virtual void DontProceed(); - - private: - void NotifyDenyCertificate(); - void NotifyAllowCertificate(); - - DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); -}; - -class SSLPolicy : public SSLManager::Delegate, - public SSLBlockingPage::Delegate { - public: - static SSLPolicy* GetDefaultPolicy(); - - virtual void OnCertError(const GURL& main_frame_url, - SSLManager::CertError* error); - virtual void OnMixedContent( - NavigationController* navigation_controller, - const GURL& main_frame_url, - SSLManager::MixedContentHandler* mixed_content_handler) { - } - - virtual void OnRequestStarted(SSLManager* manager, - const GURL& url, - ResourceType::Type resource_type, - int ssl_cert_id, - int ssl_cert_status); - virtual SecurityStyle GetDefaultStyle(const GURL& url); - - virtual SSLErrorInfo GetSSLErrorInfo(SSLManager::CertError* error); - virtual void OnDenyCertificate(SSLManager::CertError* error); - virtual void OnAllowCertificate(SSLManager::CertError* error); - - protected: - SSLPolicy(); - void OnOverridableCertError(const GURL& main_frame_url, - SSLManager::CertError* error); - void OnFatalCertError(const GURL& main_frame_url, - SSLManager::CertError* error); - private: - DISALLOW_EVIL_CONSTRUCTORS(SSLPolicy); -}; - #endif // CHROME_COMMON_TEMP_SCAFFOLDING_STUBS_H_ |