summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/browser_init.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-19 21:43:28 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-19 21:43:28 +0000
commit0d920aacaa1c7439ad940b282ea84dd3c3dacfd4 (patch)
treee75cffe568e72fcd320e85214402411dc7df18a8 /chrome/browser/ui/browser_init.cc
parent3b15e8d7d6afcff629b4e95f368e4ddc81f49000 (diff)
downloadchromium_src-0d920aacaa1c7439ad940b282ea84dd3c3dacfd4.zip
chromium_src-0d920aacaa1c7439ad940b282ea84dd3c3dacfd4.tar.gz
chromium_src-0d920aacaa1c7439ad940b282ea84dd3c3dacfd4.tar.bz2
linux: infobar for obsolete OS
We will stop providing Chrome releases for Ubuntu Hardy-era distros. We should at least inform those users about this. (Retry of r85956, with views fix.) BUG=79401 TEST=tried manually changing code to require a newer GTK, saw infobar Review URL: http://codereview.chromium.org/7012024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85977 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_init.cc')
-rw-r--r--chrome/browser/ui/browser_init.cc28
1 files changed, 27 insertions, 1 deletions
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index a3b3c40..132f023 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -78,7 +78,7 @@
#include "chrome/browser/ui/cocoa/keystone_infobar.h"
#endif
-#if defined(TOOLKIT_GTK)
+#if defined(TOOLKIT_USES_GTK)
#include "chrome/browser/ui/gtk/gtk_util.h"
#endif
@@ -1027,6 +1027,7 @@ void BrowserInit::LaunchWithProfile::AddInfoBarsIfNecessary(Browser* browser) {
AddCrashedInfoBarIfNecessary(tab_contents);
AddBadFlagsInfoBarIfNecessary(tab_contents);
AddDNSCertProvenanceCheckingWarningInfoBarIfNecessary(tab_contents);
+ AddObsoleteSystemInfoBarIfNecessary(tab_contents);
}
void BrowserInit::LaunchWithProfile::AddCrashedInfoBarIfNecessary(
@@ -1139,6 +1140,31 @@ void BrowserInit::LaunchWithProfile::
GURL(kLearnMoreURL)));
}
+void BrowserInit::LaunchWithProfile::AddObsoleteSystemInfoBarIfNecessary(
+ TabContentsWrapper* tab) {
+#if defined(TOOLKIT_USES_GTK)
+ // We've deprecated support for Ubuntu Hardy. Rather than attempting to
+ // determine whether you're using that, we instead key off the GTK version;
+ // this will also deprecate other distributions (including variants of Ubuntu)
+ // that are of a similar age.
+ // Version key:
+ // Ubuntu Hardy: GTK 2.12
+ // RHEL 6: GTK 2.18
+ // Ubuntu Lucid: GTK 2.20
+ if (gtk_check_version(2, 18, 0)) {
+ string16 message =
+ l10n_util::GetStringFUTF16(IDS_SYSTEM_OBSOLETE_MESSAGE,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
+ // Link to an article in the help center on minimum system requirements.
+ const char* kLearnMoreURL =
+ "http://www.google.com/support/chrome/bin/answer.py?answer=95411";
+ tab->AddInfoBar(new LearnMoreInfoBar(tab->tab_contents(),
+ message,
+ GURL(kLearnMoreURL)));
+ }
+#endif
+}
+
void BrowserInit::LaunchWithProfile::AddStartupURLs(
std::vector<GURL>* startup_urls) const {
// If we have urls specified beforehand (i.e. from command line) use them