summaryrefslogtreecommitdiffstats
path: root/chrome/browser/page_info_model.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 08:44:43 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 08:44:43 +0000
commit5cb67f62e75963808e46775ac29f5ea289719bce (patch)
tree22040c59dbd41c94ca45a19a2fd50df13fd3d551 /chrome/browser/page_info_model.cc
parent9f284f13fd93a37bd8afa4840e91a953f4c9bc51 (diff)
downloadchromium_src-5cb67f62e75963808e46775ac29f5ea289719bce.zip
chromium_src-5cb67f62e75963808e46775ac29f5ea289719bce.tar.gz
chromium_src-5cb67f62e75963808e46775ac29f5ea289719bce.tar.bz2
Tweaks to the SSL InfoBubble dialog.
Fixed the mixed state icon not showing for section Connection. I overlooked the fact that we already check for mixed content, but reported state as error (whereas now we want warning). Added link to help center explaining what this dialog means. BUG=http://crbug.com/52916 TEST=SSL Infobubble should show link to help center and should show mixed content icon when, for example, you open an email in Gmail with an external image embedded in it. Review URL: http://codereview.chromium.org/3221005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/page_info_model.cc')
-rw-r--r--chrome/browser/page_info_model.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc
index 3c031bc..5d15639 100644
--- a/chrome/browser/page_info_model.cc
+++ b/chrome/browser/page_info_model.cc
@@ -7,7 +7,7 @@
#include <string>
#include "app/l10n_util.h"
-#include "base/callback.h"
+#include "base/command_line.h"
#include "base/i18n/time_formatting.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
@@ -15,6 +15,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/ssl/ssl_manager.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "grit/generated_resources.h"
#include "net/base/cert_status_flags.h"
@@ -125,7 +126,11 @@ PageInfoModel::PageInfoModel(Profile* profile,
subject_name,
base::IntToString16(ssl.security_bits())));
if (ssl.displayed_insecure_content() || ssl.ran_insecure_content()) {
- state = SECTION_STATE_ERROR;
+ const CommandLine* command_line(CommandLine::ForCurrentProcess());
+ if (command_line->HasSwitch(switches::kEnableNewPageInfoBubble))
+ state = SECTION_STATE_WARNING;
+ else
+ state = SECTION_STATE_ERROR;
description.assign(l10n_util::GetStringFUTF16(
IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK,
description,
@@ -135,13 +140,6 @@ PageInfoModel::PageInfoModel(Profile* profile,
}
}
- if (state == SECTION_STATE_OK && ssl.displayed_insecure_content()) {
- state = SECTION_STATE_WARNING; // Mixed content warrants a warning.
- headline.clear();
- description.assign(l10n_util::GetStringUTF16(
- IDS_PAGE_INFO_SECURITY_MIXED_CONTENT));
- }
-
uint16 cipher_suite =
net::SSLConnectionStatusToCipherSuite(ssl.connection_status());
if (ssl.security_bits() > 0 && cipher_suite) {