diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-03 21:22:54 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-03 21:22:54 +0000 |
commit | 74b962aa204b487dabcdb2fb9e7c7c7c62db1c5f (patch) | |
tree | b657993dd56e264e0f241ee7afca583e1a53a5ab | |
parent | 6483195d6640a3727cc6e6e717718bd08036154b (diff) | |
download | chromium_src-74b962aa204b487dabcdb2fb9e7c7c7c62db1c5f.zip chromium_src-74b962aa204b487dabcdb2fb9e7c7c7c62db1c5f.tar.gz chromium_src-74b962aa204b487dabcdb2fb9e7c7c7c62db1c5f.tar.bz2 |
Move most of the core SSL code from chrome to content. The UI code that's specific to Chrome (i.e. interstitial, dialogs) stays behind. This change just moves code, and so adds a bunch of files to DEPS. I'll add proper interfaces in a follow up cl, but keeping the move simple at first.
BUG=76697
Review URL: http://codereview.chromium.org/7111013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87866 0039d316-1c4b-4281-b951-d872f2087c98
39 files changed, 114 insertions, 112 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 5a278f9..e525bc9 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -59,7 +59,6 @@ #include "chrome/browser/printing/print_job.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ssl/ssl_blocking_page.h" -#include "chrome/browser/ssl/ssl_manager.h" #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" #include "chrome/browser/ui/browser_list.h" @@ -85,6 +84,7 @@ #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/ssl/ssl_manager.h" #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_view.h" diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc index b457b2f..2057299 100644 --- a/chrome/browser/page_info_model.cc +++ b/chrome/browser/page_info_model.cc @@ -12,8 +12,8 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ssl/ssl_error_info.h" -#include "chrome/browser/ssl/ssl_manager.h" #include "content/browser/cert_store.h" +#include "content/browser/ssl/ssl_manager.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "net/base/cert_status_flags.h" diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index e2f40e8..6b90be5 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc @@ -43,7 +43,6 @@ #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/browser/search_engines/template_url_prepopulate_data.h" -#include "chrome/browser/ssl/ssl_manager.h" #include "chrome/browser/sync/signin_manager.h" #include "chrome/browser/tabs/pinned_tab_codec.h" #include "chrome/browser/task_manager/task_manager.h" @@ -59,6 +58,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/host_zoom_map.h" #include "content/browser/renderer_host/browser_render_process_host.h" +#include "content/browser/ssl/ssl_manager.h" #if defined(TOOLKIT_VIEWS) // TODO(port): whittle this down as we port #include "chrome/browser/ui/views/browser_actions_container.h" diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc index 41e50ad..d8ce3b1 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc @@ -27,7 +27,6 @@ #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/off_the_record_profile_io_data.h" #include "chrome/browser/profiles/profile_dependency_manager.h" -#include "chrome/browser/ssl/ssl_host_state.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/transport_security_persister.h" @@ -48,6 +47,7 @@ #include "content/browser/file_system/browser_file_system_helper.h" #include "content/browser/host_zoom_map.h" #include "content/browser/in_process_webkit/webkit_context.h" +#include "content/browser/ssl/ssl_host_state.h" #include "content/common/notification_service.h" #include "grit/locale_settings.h" #include "net/base/transport_security_state.h" diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 9551436..20daa161 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -61,7 +61,6 @@ #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/browser/sessions/session_service_factory.h" #include "chrome/browser/spellcheck_host.h" -#include "chrome/browser/ssl/ssl_host_state.h" #include "chrome/browser/sync/profile_sync_factory_impl.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/tabs/pinned_tab_service_factory.h" @@ -92,6 +91,7 @@ #include "content/browser/host_zoom_map.h" #include "content/browser/in_process_webkit/webkit_context.h" #include "content/browser/renderer_host/render_process_host.h" +#include "content/browser/ssl/ssl_host_state.h" #include "content/browser/user_metrics.h" #include "content/common/notification_service.h" #include "grit/browser_resources.h" diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc index 04ca06f..97da845 100644 --- a/chrome/browser/ssl/ssl_blocking_page.cc +++ b/chrome/browser/ssl/ssl_blocking_page.cc @@ -10,12 +10,12 @@ #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/dom_operation_notification_details.h" -#include "chrome/browser/ssl/ssl_cert_error_handler.h" #include "chrome/browser/ssl/ssl_error_info.h" #include "chrome/common/jstemplate_builder.h" #include "content/browser/cert_store.h" #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/browser/ssl/ssl_cert_error_handler.h" #include "content/browser/tab_contents/navigation_controller.h" #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc index eb5599e..1fa0b0f 100644 --- a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc +++ b/chrome/browser/tab_contents/tab_contents_ssl_helper.cc @@ -9,11 +9,11 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/certificate_viewer.h" #include "chrome/browser/ssl/ssl_add_cert_handler.h" -#include "chrome/browser/ssl/ssl_client_auth_handler.h" #include "chrome/browser/ssl_client_certificate_selector.h" #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" +#include "content/browser/ssl/ssl_client_auth_handler.h" #include "content/common/notification_details.h" #include "content/common/notification_source.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm b/chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm index 8cf855b..a0d1d59 100644 --- a/chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm +++ b/chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm @@ -14,9 +14,9 @@ #include "base/string_util.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/ssl/ssl_client_auth_handler.h" #import "chrome/browser/ui/cocoa/constrained_window_mac.h" #include "content/browser/browser_thread.h" +#include "content/browser/ssl/ssl_client_auth_handler.h" #include "content/browser/tab_contents/tab_contents.h" #include "grit/generated_resources.h" #include "net/base/x509_certificate.h" diff --git a/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc b/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc index f13c7ef..aa25e15b 100644 --- a/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc +++ b/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc @@ -13,13 +13,13 @@ #include "base/logging.h" #include "base/utf_string_conversions.h" #include "chrome/browser/certificate_viewer.h" -#include "chrome/browser/ssl/ssl_client_auth_handler.h" #include "chrome/browser/ui/crypto_module_password_dialog.h" #include "chrome/browser/ui/gtk/constrained_window_gtk.h" #include "chrome/browser/ui/gtk/gtk_util.h" #include "chrome/browser/ui/gtk/owned_widget_gtk.h" #include "chrome/common/net/x509_certificate_model.h" #include "content/browser/browser_thread.h" +#include "content/browser/ssl/ssl_client_auth_handler.h" #include "content/browser/tab_contents/tab_contents.h" #include "grit/generated_resources.h" #include "net/base/x509_certificate.h" diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc index 01bf34c..24a1330 100644 --- a/chrome/browser/ui/toolbar/toolbar_model.cc +++ b/chrome/browser/ui/toolbar/toolbar_model.cc @@ -23,6 +23,7 @@ #include "grit/theme_resources.h" #include "net/base/cert_status_flags.h" #include "net/base/net_util.h" +#include "ui/base/l10n/l10n_util.h" ToolbarModel::ToolbarModel(Browser* browser) : browser_(browser), @@ -120,7 +121,22 @@ std::wstring ToolbarModel::GetEVCertName() const { // the security level would be NONE. CertStore::GetInstance()->RetrieveCert( GetNavigationController()->GetActiveEntry()->ssl().cert_id(), &cert); - return UTF16ToWideHack(SSLManager::GetEVCertName(*cert)); + return UTF16ToWideHack(GetEVCertName(*cert)); +} + +// static +string16 ToolbarModel::GetEVCertName(const net::X509Certificate& cert) { + // EV are required to have an organization name and country. + if (cert.subject().organization_names.empty() || + cert.subject().country_name.empty()) { + NOTREACHED(); + return string16(); + } + + return l10n_util::GetStringFUTF16( + IDS_SECURE_CONNECTION_EV, + UTF8ToUTF16(cert.subject().organization_names[0]), + UTF8ToUTF16(cert.subject().country_name)); } NavigationController* ToolbarModel::GetNavigationController() const { diff --git a/chrome/browser/ui/toolbar/toolbar_model.h b/chrome/browser/ui/toolbar/toolbar_model.h index 140b2f9..709e39d 100644 --- a/chrome/browser/ui/toolbar/toolbar_model.h +++ b/chrome/browser/ui/toolbar/toolbar_model.h @@ -9,10 +9,15 @@ #include <string> #include "base/basictypes.h" +#include "base/string16.h" class Browser; class NavigationController; +namespace net { +class X509Certificate; +} + // This class is the model used by the toolbar, location bar and autocomplete // edit. It populates its states from the current navigation entry retrieved // from the navigation controller returned by GetNavigationController(). @@ -54,6 +59,9 @@ class ToolbarModel { void set_input_in_progress(bool value) { input_in_progress_ = value; } bool input_in_progress() const { return input_in_progress_; } + // Returns "<organization_name> [<country>]". + static string16 GetEVCertName(const net::X509Certificate& cert); + private: // Returns the navigation controller used to retrieve the navigation entry // from which the states are retrieved. diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector_win.cc b/chrome/browser/ui/views/ssl_client_certificate_selector_win.cc index bee7774..51bfa20 100644 --- a/chrome/browser/ui/views/ssl_client_certificate_selector_win.cc +++ b/chrome/browser/ui/views/ssl_client_certificate_selector_win.cc @@ -10,9 +10,9 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/ssl/ssl_client_auth_handler.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_window.h" +#include "content/browser/ssl/ssl_client_auth_handler.h" #include "content/browser/tab_contents/tab_contents.h" #include "grit/generated_resources.h" #include "net/url_request/url_request.h" diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 3c6f898..23015c2 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1904,26 +1904,8 @@ 'browser/ssl/ssl_add_cert_handler_mac.mm', 'browser/ssl/ssl_blocking_page.cc', 'browser/ssl/ssl_blocking_page.h', - 'browser/ssl/ssl_cert_error_handler.cc', - 'browser/ssl/ssl_cert_error_handler.h', - 'browser/ssl/ssl_client_auth_handler.cc', - 'browser/ssl/ssl_client_auth_handler.h', - 'browser/ssl/ssl_client_auth_notification_details.cc', - 'browser/ssl/ssl_client_auth_notification_details.h', - 'browser/ssl/ssl_error_handler.cc', - 'browser/ssl/ssl_error_handler.h', 'browser/ssl/ssl_error_info.cc', 'browser/ssl/ssl_error_info.h', - 'browser/ssl/ssl_host_state.cc', - 'browser/ssl/ssl_host_state.h', - 'browser/ssl/ssl_manager.cc', - 'browser/ssl/ssl_manager.h', - 'browser/ssl/ssl_policy.cc', - 'browser/ssl/ssl_policy.h', - 'browser/ssl/ssl_policy_backend.cc', - 'browser/ssl/ssl_policy_backend.h', - 'browser/ssl/ssl_request_info.cc', - 'browser/ssl/ssl_request_info.h', 'browser/ssl_client_certificate_selector.h', 'browser/status_icons/status_icon.cc', 'browser/status_icons/status_icon.h', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 3658923..258d53a 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -1576,7 +1576,6 @@ 'browser/shell_integration_unittest.cc', 'browser/speech/speech_input_bubble_controller_unittest.cc', 'browser/spellchecker_platform_engine_unittest.cc', - 'browser/ssl/ssl_host_state_unittest.cc', 'browser/status_icons/status_icon_unittest.cc', 'browser/status_icons/status_tray_unittest.cc', 'browser/sync/abstract_profile_sync_service_test.cc', @@ -1962,6 +1961,7 @@ '../content/browser/speech/endpointer/endpointer_unittest.cc', '../content/browser/speech/speech_recognition_request_unittest.cc', '../content/browser/speech/speech_recognizer_unittest.cc', + '../content/browser/ssl/ssl_host_state_unittest.cc', '../content/browser/tab_contents/navigation_controller_unittest.cc', '../content/browser/tab_contents/navigation_entry_unittest.cc', '../content/browser/tab_contents/render_view_host_manager_unittest.cc', diff --git a/content/browser/DEPS b/content/browser/DEPS index 2f4ed5e..d6142c6 100644 --- a/content/browser/DEPS +++ b/content/browser/DEPS @@ -47,8 +47,11 @@ include_rules = [ "+chrome/browser/sessions/session_types.h", "+chrome/browser/ssl/ssl_add_cert_handler.h", - "+chrome/browser/ssl/ssl_client_auth_handler.h", - "+chrome/browser/ssl/ssl_manager.h", + "+chrome/browser/ssl/ssl_blocking_page.h", + "+chrome/browser/ssl/ssl_error_info.h", + "+chrome/browser/tab_contents/tab_contents_ssl_helper.h", + "+chrome/browser/tab_contents/tab_util.h", + "+chrome/browser/ui/tab_contents/tab_contents_wrapper.h", "+chrome/browser/tab_contents/render_view_host_delegate_helper.h", diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc index 200466a..e6f4191 100644 --- a/content/browser/renderer_host/resource_dispatcher_host.cc +++ b/content/browser/renderer_host/resource_dispatcher_host.cc @@ -25,8 +25,6 @@ #include "chrome/browser/download/save_file_manager.h" #include "chrome/browser/renderer_host/download_resource_handler.h" #include "chrome/browser/renderer_host/save_file_resource_handler.h" -#include "chrome/browser/ssl/ssl_client_auth_handler.h" -#include "chrome/browser/ssl/ssl_manager.h" #include "content/browser/appcache/chrome_appcache_service.h" #include "content/browser/cert_store.h" #include "content/browser/child_process_security_policy.h" @@ -51,6 +49,8 @@ #include "content/browser/renderer_host/resource_queue.h" #include "content/browser/renderer_host/resource_request_details.h" #include "content/browser/renderer_host/sync_resource_handler.h" +#include "content/browser/ssl/ssl_client_auth_handler.h" +#include "content/browser/ssl/ssl_manager.h" #include "content/browser/worker_host/worker_service.h" #include "content/common/content_switches.h" #include "content/common/notification_service.h" diff --git a/content/browser/renderer_host/resource_dispatcher_host_request_info.cc b/content/browser/renderer_host/resource_dispatcher_host_request_info.cc index b1edd29..ec5211d 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_request_info.cc +++ b/content/browser/renderer_host/resource_dispatcher_host_request_info.cc @@ -4,9 +4,9 @@ #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" -#include "chrome/browser/ssl/ssl_client_auth_handler.h" #include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.h" #include "content/browser/renderer_host/resource_handler.h" +#include "content/browser/ssl/ssl_client_auth_handler.h" #include "webkit/blob/blob_data.h" ResourceDispatcherHostRequestInfo::ResourceDispatcherHostRequestInfo( diff --git a/chrome/browser/ssl/ssl_cert_error_handler.cc b/content/browser/ssl/ssl_cert_error_handler.cc index 953e653..c668b41 100644 --- a/chrome/browser/ssl/ssl_cert_error_handler.cc +++ b/content/browser/ssl/ssl_cert_error_handler.cc @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_cert_error_handler.h" +#include "content/browser/ssl/ssl_cert_error_handler.h" -#include "chrome/browser/ssl/ssl_manager.h" -#include "chrome/browser/ssl/ssl_policy.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" +#include "content/browser/ssl/ssl_policy.h" #include "net/base/x509_certificate.h" SSLCertErrorHandler::SSLCertErrorHandler( diff --git a/chrome/browser/ssl/ssl_cert_error_handler.h b/content/browser/ssl/ssl_cert_error_handler.h index fe3782b..6dcbe0f 100644 --- a/chrome/browser/ssl/ssl_cert_error_handler.h +++ b/content/browser/ssl/ssl_cert_error_handler.h @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ -#define CHROME_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ +#define CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ #pragma once #include <string> -#include "chrome/browser/ssl/ssl_error_handler.h" +#include "content/browser/ssl/ssl_error_handler.h" #include "net/base/ssl_info.h" namespace net { @@ -48,4 +48,4 @@ class SSLCertErrorHandler : public SSLErrorHandler { DISALLOW_COPY_AND_ASSIGN(SSLCertErrorHandler); }; -#endif // CHROME_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ +#endif // CONTENT_BROWSER_SSL_SSL_CERT_ERROR_HANDLER_H_ diff --git a/chrome/browser/ssl/ssl_client_auth_handler.cc b/content/browser/ssl/ssl_client_auth_handler.cc index afb82a2c6..02cb174 100644 --- a/chrome/browser/ssl/ssl_client_auth_handler.cc +++ b/content/browser/ssl/ssl_client_auth_handler.cc @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_client_auth_handler.h" +#include "content/browser/ssl/ssl_client_auth_handler.h" -#include "chrome/browser/ssl/ssl_client_auth_notification_details.h" #include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" +#include "content/browser/ssl/ssl_client_auth_notification_details.h" #include "content/common/notification_service.h" #include "net/url_request/url_request.h" diff --git a/chrome/browser/ssl/ssl_client_auth_handler.h b/content/browser/ssl/ssl_client_auth_handler.h index 3051220..0b2e9cb 100644 --- a/chrome/browser/ssl/ssl_client_auth_handler.h +++ b/content/browser/ssl/ssl_client_auth_handler.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ -#define CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ +#define CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ #pragma once #include "base/basictypes.h" @@ -108,4 +108,4 @@ class SSLClientAuthObserver : public NotificationObserver { DISALLOW_COPY_AND_ASSIGN(SSLClientAuthObserver); }; -#endif // CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ +#endif // CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_H_ diff --git a/chrome/browser/ssl/ssl_client_auth_notification_details.cc b/content/browser/ssl/ssl_client_auth_notification_details.cc index 16c79f8..237c909 100644 --- a/chrome/browser/ssl/ssl_client_auth_notification_details.cc +++ b/content/browser/ssl/ssl_client_auth_notification_details.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_client_auth_notification_details.h" +#include "content/browser/ssl/ssl_client_auth_notification_details.h" #include "net/base/ssl_cert_request_info.h" diff --git a/chrome/browser/ssl/ssl_client_auth_notification_details.h b/content/browser/ssl/ssl_client_auth_notification_details.h index 523dcab..eea3d25 100644 --- a/chrome/browser/ssl/ssl_client_auth_notification_details.h +++ b/content/browser/ssl/ssl_client_auth_notification_details.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_NOTIFICATION_DETAILS_H_ -#define CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_NOTIFICATION_DETAILS_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_NOTIFICATION_DETAILS_H_ +#define CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_NOTIFICATION_DETAILS_H_ #include "base/basictypes.h" @@ -29,4 +29,4 @@ class SSLClientAuthNotificationDetails { DISALLOW_COPY_AND_ASSIGN(SSLClientAuthNotificationDetails); }; -#endif // CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_NOTIFICATION_DETAILS_H_ +#endif // CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_NOTIFICATION_DETAILS_H_ diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/content/browser/ssl/ssl_error_handler.cc index ad3e7a3..17d1fde 100644 --- a/chrome/browser/ssl/ssl_error_handler.cc +++ b/content/browser/ssl/ssl_error_handler.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_error_handler.h" +#include "content/browser/ssl/ssl_error_handler.h" -#include "chrome/browser/ssl/ssl_cert_error_handler.h" #include "chrome/browser/tab_contents/tab_util.h" #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" +#include "content/browser/ssl/ssl_cert_error_handler.h" #include "content/browser/tab_contents/tab_contents.h" #include "net/base/net_errors.h" #include "net/url_request/url_request.h" diff --git a/chrome/browser/ssl/ssl_error_handler.h b/content/browser/ssl/ssl_error_handler.h index 2ddc886..3fe0dee 100644 --- a/chrome/browser/ssl/ssl_error_handler.h +++ b/content/browser/ssl/ssl_error_handler.h @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ -#define CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ +#define CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ #pragma once #include <string> #include "base/basictypes.h" #include "base/memory/ref_counted.h" -#include "chrome/browser/ssl/ssl_manager.h" #include "content/browser/renderer_host/global_request_id.h" +#include "content/browser/ssl/ssl_manager.h" #include "googleurl/src/gurl.h" #include "webkit/glue/resource_type.h" @@ -141,4 +141,4 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> { DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); }; -#endif // CHROME_BROWSER_SSL_SSL_ERROR_HANDLER_H_ +#endif // CONTENT_BROWSER_SSL_SSL_ERROR_HANDLER_H_ diff --git a/chrome/browser/ssl/ssl_host_state.cc b/content/browser/ssl/ssl_host_state.cc index 15c9b98..7b0deef 100644 --- a/chrome/browser/ssl/ssl_host_state.cc +++ b/content/browser/ssl/ssl_host_state.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_host_state.h" +#include "content/browser/ssl/ssl_host_state.h" #include "base/logging.h" diff --git a/chrome/browser/ssl/ssl_host_state.h b/content/browser/ssl/ssl_host_state.h index a23a239..943f44e 100644 --- a/chrome/browser/ssl/ssl_host_state.h +++ b/content/browser/ssl/ssl_host_state.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_HOST_STATE_H_ -#define CHROME_BROWSER_SSL_SSL_HOST_STATE_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ +#define CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ #pragma once #include <string> @@ -60,4 +60,4 @@ class SSLHostState : public base::NonThreadSafe { DISALLOW_COPY_AND_ASSIGN(SSLHostState); }; -#endif // CHROME_BROWSER_SSL_SSL_HOST_STATE_H_ +#endif // CONTENT_BROWSER_SSL_SSL_HOST_STATE_H_ diff --git a/chrome/browser/ssl/ssl_host_state_unittest.cc b/content/browser/ssl/ssl_host_state_unittest.cc index e239f90..08a589f 100644 --- a/chrome/browser/ssl/ssl_host_state_unittest.cc +++ b/content/browser/ssl/ssl_host_state_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_host_state.h" +#include "content/browser/ssl/ssl_host_state.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/chrome/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc index 90a34c0..4efe034 100644 --- a/chrome/browser/ssl/ssl_manager.cc +++ b/content/browser/ssl/ssl_manager.cc @@ -2,25 +2,23 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_manager.h" +#include "content/browser/ssl/ssl_manager.h" #include "base/utf_string_conversions.h" #include "chrome/browser/load_from_memory_cache_details.h" -#include "chrome/browser/ssl/ssl_cert_error_handler.h" -#include "chrome/browser/ssl/ssl_policy.h" -#include "chrome/browser/ssl/ssl_request_info.h" #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/resource_dispatcher_host.h" #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "content/browser/renderer_host/resource_request_details.h" +#include "content/browser/ssl/ssl_cert_error_handler.h" +#include "content/browser/ssl/ssl_policy.h" +#include "content/browser/ssl/ssl_request_info.h" #include "content/browser/tab_contents/navigation_details.h" #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/provisional_load_details.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/common/notification_service.h" -#include "grit/generated_resources.h" #include "net/base/cert_status_flags.h" -#include "ui/base/l10n/l10n_util.h" // static void SSLManager::OnSSLCertificateError(ResourceDispatcherHost* rdh, @@ -92,21 +90,6 @@ bool SSLManager::DeserializeSecurityInfo(const std::string& state, pickle.ReadInt(&iter, ssl_connection_status); } -// static -string16 SSLManager::GetEVCertName(const net::X509Certificate& cert) { - // EV are required to have an organization name and country. - if (cert.subject().organization_names.empty() || - cert.subject().country_name.empty()) { - NOTREACHED(); - return string16(); - } - - return l10n_util::GetStringFUTF16( - IDS_SECURE_CONNECTION_EV, - UTF8ToUTF16(cert.subject().organization_names[0]), - UTF8ToUTF16(cert.subject().country_name)); -} - SSLManager::SSLManager(NavigationController* controller) : backend_(controller), policy_(new SSLPolicy(&backend_)), diff --git a/chrome/browser/ssl/ssl_manager.h b/content/browser/ssl/ssl_manager.h index 4031129..8ceeddf 100644 --- a/chrome/browser/ssl/ssl_manager.h +++ b/content/browser/ssl/ssl_manager.h @@ -2,16 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_MANAGER_H_ -#define CHROME_BROWSER_SSL_SSL_MANAGER_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_MANAGER_H_ +#define CONTENT_BROWSER_SSL_SSL_MANAGER_H_ #pragma once #include <string> #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "base/string16.h" -#include "chrome/browser/ssl/ssl_policy_backend.h" +#include "content/browser/ssl/ssl_policy_backend.h" #include "content/common/notification_observer.h" #include "content/common/notification_registrar.h" #include "googleurl/src/gurl.h" @@ -66,9 +65,6 @@ class SSLManager : public NotificationObserver { int* security_bits, int* connection_status); - // Returns "<organization_name> [<country>]". - static string16 GetEVCertName(const net::X509Certificate& cert); - // Construct an SSLManager for the specified tab. // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used. explicit SSLManager(NavigationController* controller); @@ -129,4 +125,4 @@ class SSLManager : public NotificationObserver { DISALLOW_COPY_AND_ASSIGN(SSLManager); }; -#endif // CHROME_BROWSER_SSL_SSL_MANAGER_H_ +#endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ diff --git a/chrome/browser/ssl/ssl_policy.cc b/content/browser/ssl/ssl_policy.cc index c7518fe..9be48a3 100644 --- a/chrome/browser/ssl/ssl_policy.cc +++ b/content/browser/ssl/ssl_policy.cc @@ -2,25 +2,22 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_policy.h" +#include "content/browser/ssl/ssl_policy.h" #include "base/base_switches.h" #include "base/command_line.h" #include "base/memory/singleton.h" #include "base/string_piece.h" #include "base/string_util.h" -#include "chrome/browser/ssl/ssl_cert_error_handler.h" #include "chrome/browser/ssl/ssl_error_info.h" -#include "chrome/browser/ssl/ssl_request_info.h" -#include "chrome/common/jstemplate_builder.h" -#include "chrome/common/time_format.h" -#include "chrome/common/url_constants.h" #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/site_instance.h" +#include "content/browser/ssl/ssl_cert_error_handler.h" +#include "content/browser/ssl/ssl_request_info.h" #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" -#include "grit/generated_resources.h" +#include "content/common/url_constants.h" #include "net/base/cert_status_flags.h" #include "net/base/ssl_info.h" #include "webkit/glue/resource_type.h" diff --git a/chrome/browser/ssl/ssl_policy.h b/content/browser/ssl/ssl_policy.h index 58b83a8..b1bf5a0 100644 --- a/chrome/browser/ssl/ssl_policy.h +++ b/content/browser/ssl/ssl_policy.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_POLICY_H_ -#define CHROME_BROWSER_SSL_SSL_POLICY_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_POLICY_H_ +#define CONTENT_BROWSER_SSL_SSL_POLICY_H_ #pragma once #include <string> @@ -68,4 +68,4 @@ class SSLPolicy : public SSLBlockingPage::Delegate { DISALLOW_COPY_AND_ASSIGN(SSLPolicy); }; -#endif // CHROME_BROWSER_SSL_SSL_POLICY_H_ +#endif // CONTENT_BROWSER_SSL_SSL_POLICY_H_ diff --git a/chrome/browser/ssl/ssl_policy_backend.cc b/content/browser/ssl/ssl_policy_backend.cc index a545b85..82c4653 100644 --- a/chrome/browser/ssl/ssl_policy_backend.cc +++ b/content/browser/ssl/ssl_policy_backend.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_policy_backend.h" +#include "content/browser/ssl/ssl_policy_backend.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ssl/ssl_host_state.h" +#include "content/browser/ssl/ssl_host_state.h" #include "content/browser/tab_contents/navigation_controller.h" SSLPolicyBackend::SSLPolicyBackend(NavigationController* controller) diff --git a/chrome/browser/ssl/ssl_policy_backend.h b/content/browser/ssl/ssl_policy_backend.h index 813f2be..97fa38f 100644 --- a/chrome/browser/ssl/ssl_policy_backend.h +++ b/content/browser/ssl/ssl_policy_backend.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_POLICY_BACKEND_H_ -#define CHROME_BROWSER_SSL_SSL_POLICY_BACKEND_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ +#define CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ #pragma once #include <string> @@ -43,4 +43,4 @@ class SSLPolicyBackend { DISALLOW_COPY_AND_ASSIGN(SSLPolicyBackend); }; -#endif // CHROME_BROWSER_SSL_SSL_POLICY_BACKEND_H_ +#endif // CONTENT_BROWSER_SSL_SSL_POLICY_BACKEND_H_ diff --git a/chrome/browser/ssl/ssl_request_info.cc b/content/browser/ssl/ssl_request_info.cc index 0647dab..19d4e4d 100644 --- a/chrome/browser/ssl/ssl_request_info.cc +++ b/content/browser/ssl/ssl_request_info.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl/ssl_request_info.h" +#include "content/browser/ssl/ssl_request_info.h" SSLRequestInfo::SSLRequestInfo(const GURL& url, ResourceType::Type resource_type, diff --git a/chrome/browser/ssl/ssl_request_info.h b/content/browser/ssl/ssl_request_info.h index 2e797f8..1ab433d 100644 --- a/chrome/browser/ssl/ssl_request_info.h +++ b/content/browser/ssl/ssl_request_info.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ -#define CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ +#ifndef CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ +#define CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ #pragma once #include <string> @@ -43,4 +43,4 @@ class SSLRequestInfo : public base::RefCounted<SSLRequestInfo> { DISALLOW_COPY_AND_ASSIGN(SSLRequestInfo); }; -#endif // CHROME_BROWSER_SSL_SSL_REQUEST_INFO_H_ +#endif // CONTENT_BROWSER_SSL_SSL_REQUEST_INFO_H_ diff --git a/content/browser/tab_contents/navigation_controller.h b/content/browser/tab_contents/navigation_controller.h index 5994ce2..025c2b0 100644 --- a/content/browser/tab_contents/navigation_controller.h +++ b/content/browser/tab_contents/navigation_controller.h @@ -15,7 +15,7 @@ #include "base/time.h" #include "googleurl/src/gurl.h" #include "chrome/browser/sessions/session_id.h" -#include "chrome/browser/ssl/ssl_manager.h" +#include "content/browser/ssl/ssl_manager.h" #include "content/common/navigation_types.h" #include "content/common/page_transition_types.h" diff --git a/content/browser/tab_contents/provisional_load_details.cc b/content/browser/tab_contents/provisional_load_details.cc index 319f2b0..0d84aa3 100644 --- a/content/browser/tab_contents/provisional_load_details.cc +++ b/content/browser/tab_contents/provisional_load_details.cc @@ -5,7 +5,7 @@ #include "content/browser/tab_contents/provisional_load_details.h" -#include "chrome/browser/ssl/ssl_manager.h" +#include "content/browser/ssl/ssl_manager.h" ProvisionalLoadDetails::ProvisionalLoadDetails(bool is_main_frame, bool is_in_page_navigation, diff --git a/content/content_browser.gypi b/content/content_browser.gypi index f27de01..77d4cce 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -315,6 +315,24 @@ 'browser/speech/speech_recognition_request.h', 'browser/speech/speech_recognizer.cc', 'browser/speech/speech_recognizer.h', + 'browser/ssl/ssl_cert_error_handler.cc', + 'browser/ssl/ssl_cert_error_handler.h', + 'browser/ssl/ssl_client_auth_handler.cc', + 'browser/ssl/ssl_client_auth_handler.h', + 'browser/ssl/ssl_client_auth_notification_details.cc', + 'browser/ssl/ssl_client_auth_notification_details.h', + 'browser/ssl/ssl_error_handler.cc', + 'browser/ssl/ssl_error_handler.h', + 'browser/ssl/ssl_host_state.cc', + 'browser/ssl/ssl_host_state.h', + 'browser/ssl/ssl_manager.cc', + 'browser/ssl/ssl_manager.h', + 'browser/ssl/ssl_policy.cc', + 'browser/ssl/ssl_policy.h', + 'browser/ssl/ssl_policy_backend.cc', + 'browser/ssl/ssl_policy_backend.h', + 'browser/ssl/ssl_request_info.cc', + 'browser/ssl/ssl_request_info.h', 'browser/tab_contents/constrained_window.h', 'browser/tab_contents/interstitial_page.cc', 'browser/tab_contents/interstitial_page.h', |