Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Side by Side Diff: chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc

Issue 326043002: Cleanup: Remove more dead GTK code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/startup/obsolete_system_infobar_delegate.h" 5 #include "chrome/browser/ui/startup/obsolete_system_infobar_delegate.h"
6 6
7 #include "base/cpu.h" 7 #include "base/cpu.h"
8 #include "chrome/browser/infobars/infobar_service.h" 8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "components/infobars/core/infobar.h" 10 #include "components/infobars/core/infobar.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 #include "grit/chromium_strings.h" 12 #include "grit/chromium_strings.h"
13 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
14 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
15 15
16 #if defined(OS_MACOSX) 16 #if defined(OS_MACOSX)
17 #include "chrome/browser/mac/obsolete_system.h" 17 #include "chrome/browser/mac/obsolete_system.h"
18 #endif 18 #endif
19 19
20 #if defined(TOOLKIT_GTK)
21 #include <gtk/gtk.h>
22 #endif
23
24 // static 20 // static
25 void ObsoleteSystemInfoBarDelegate::Create(InfoBarService* infobar_service) { 21 void ObsoleteSystemInfoBarDelegate::Create(InfoBarService* infobar_service) {
26 #if defined(OS_MACOSX) 22 #if defined(OS_MACOSX)
27 if (!ObsoleteSystemMac::Is32BitObsoleteNowOrSoon() || 23 if (!ObsoleteSystemMac::Is32BitObsoleteNowOrSoon() ||
28 !ObsoleteSystemMac::Has32BitOnlyCPU()) { 24 !ObsoleteSystemMac::Has32BitOnlyCPU()) {
29 return; 25 return;
30 } 26 }
31 #elif defined(TOOLKIT_GTK)
32 // We've deprecated support for Ubuntu Lucid. Rather than attempting to
33 // determine whether you're using that, we instead key off the GTK version;
34 // this will also deprecate other distributions (including variants of Ubuntu)
35 // that are of a similar age.
36 // Version key:
37 // RHEL 6: GTK 2.18
38 // Debian 6 (Squeeze): GTK 2.20
39 // Ubuntu Lucid: GTK 2.20
40 // openSUSE 12.2 GTK 2.24
41 // Ubuntu Precise: GTK 2.24
42 if (!gtk_check_version(2, 24, 0))
43 return;
44 #elif defined(OS_WIN) 27 #elif defined(OS_WIN)
45 // On Windows we no longer support non-SSE2 machines since Chrome 35. 28 // On Windows we no longer support non-SSE2 machines since Chrome 35.
46 if (base::CPU().has_sse2()) 29 if (base::CPU().has_sse2())
47 return; 30 return;
48 #else 31 #else
49 // No other platforms currently show this infobar. 32 // No other platforms currently show this infobar.
50 return; 33 return;
51 #endif 34 #endif
52 35
53 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( 36 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 GURL(chrome::kMac32BitDeprecationURL), 70 GURL(chrome::kMac32BitDeprecationURL),
88 #else 71 #else
89 GURL("http://www.google.com/support/chrome/bin/" 72 GURL("http://www.google.com/support/chrome/bin/"
90 "answer.py?answer=95411"), 73 "answer.py?answer=95411"),
91 #endif 74 #endif
92 content::Referrer(), 75 content::Referrer(),
93 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, 76 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition,
94 content::PAGE_TRANSITION_LINK, false)); 77 content::PAGE_TRANSITION_LINK, false));
95 return false; 78 return false;
96 } 79 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698