| OLD | NEW |
| 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 #include "chrome/browser/ui/website_settings/website_settings.h" | 5 #include "chrome/browser/ui/website_settings/website_settings.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/i18n/time_formatting.h" | 11 #include "base/i18n/time_formatting.h" |
| 12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
| 19 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" | 19 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" |
| 20 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" | 20 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
| 21 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 21 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
| 22 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" | 22 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" |
| 23 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" | 23 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" |
| 24 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" | 24 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" |
| 25 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 25 #include "chrome/browser/history/history_service_factory.h" | 26 #include "chrome/browser/history/history_service_factory.h" |
| 26 #include "chrome/browser/infobars/infobar_service.h" | 27 #include "chrome/browser/infobars/infobar_service.h" |
| 27 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" | 29 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" |
| 29 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" | 30 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" |
| 30 #include "chrome/browser/ssl/ssl_error_info.h" | 31 #include "chrome/browser/ssl/ssl_error_info.h" |
| 31 #include "chrome/browser/ui/website_settings/website_settings_ui.h" | 32 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
| 32 #include "chrome/common/chrome_switches.h" | 33 #include "chrome/common/chrome_switches.h" |
| 33 #include "chrome/common/url_constants.h" | 34 #include "chrome/common/url_constants.h" |
| 34 #include "chrome/grit/chromium_strings.h" | 35 #include "chrome/grit/chromium_strings.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 : TabSpecificContentSettings::SiteDataObserver( | 158 : TabSpecificContentSettings::SiteDataObserver( |
| 158 tab_specific_content_settings), | 159 tab_specific_content_settings), |
| 159 ui_(ui), | 160 ui_(ui), |
| 160 web_contents_(web_contents), | 161 web_contents_(web_contents), |
| 161 show_info_bar_(false), | 162 show_info_bar_(false), |
| 162 site_url_(url), | 163 site_url_(url), |
| 163 site_identity_status_(SITE_IDENTITY_STATUS_UNKNOWN), | 164 site_identity_status_(SITE_IDENTITY_STATUS_UNKNOWN), |
| 164 cert_id_(0), | 165 cert_id_(0), |
| 165 site_connection_status_(SITE_CONNECTION_STATUS_UNKNOWN), | 166 site_connection_status_(SITE_CONNECTION_STATUS_UNKNOWN), |
| 166 cert_store_(cert_store), | 167 cert_store_(cert_store), |
| 167 content_settings_(profile->GetHostContentSettingsMap()), | 168 content_settings_(HostContentSettingsMapFactory::GetForProfile(profile)), |
| 168 chrome_ssl_host_state_delegate_( | 169 chrome_ssl_host_state_delegate_( |
| 169 ChromeSSLHostStateDelegateFactory::GetForProfile(profile)), | 170 ChromeSSLHostStateDelegateFactory::GetForProfile(profile)), |
| 170 did_revoke_user_ssl_decisions_(false) { | 171 did_revoke_user_ssl_decisions_(false) { |
| 171 Init(profile, url, ssl); | 172 Init(profile, url, ssl); |
| 172 | 173 |
| 173 PresentSitePermissions(); | 174 PresentSitePermissions(); |
| 174 PresentSiteData(); | 175 PresentSiteData(); |
| 175 PresentSiteIdentity(); | 176 PresentSiteIdentity(); |
| 176 | 177 |
| 177 // Every time the Website Settings UI is opened a |WebsiteSettings| object is | 178 // Every time the Website Settings UI is opened a |WebsiteSettings| object is |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 info.connection_status = site_connection_status_; | 723 info.connection_status = site_connection_status_; |
| 723 info.connection_status_description = | 724 info.connection_status_description = |
| 724 UTF16ToUTF8(site_connection_details_); | 725 UTF16ToUTF8(site_connection_details_); |
| 725 info.identity_status = site_identity_status_; | 726 info.identity_status = site_identity_status_; |
| 726 info.identity_status_description = | 727 info.identity_status_description = |
| 727 UTF16ToUTF8(site_identity_details_); | 728 UTF16ToUTF8(site_identity_details_); |
| 728 info.cert_id = cert_id_; | 729 info.cert_id = cert_id_; |
| 729 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; | 730 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; |
| 730 ui_->SetIdentityInfo(info); | 731 ui_->SetIdentityInfo(info); |
| 731 } | 732 } |
| OLD | NEW |