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/startup/obsolete_system_infobar_delegate.h" | 5 #include "chrome/browser/ui/startup/obsolete_system_infobar_delegate.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/infobars/infobar_service.h" | 8 #include "chrome/browser/infobars/infobar_service.h" |
9 #include "chrome/browser/obsolete_system/obsolete_system.h" | 9 #include "chrome/browser/obsolete_system/obsolete_system.h" |
10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
12 #include "chrome/grit/chromium_strings.h" | 12 #include "chrome/grit/chromium_strings.h" |
13 #include "components/infobars/core/infobar.h" | 13 #include "components/infobars/core/infobar.h" |
14 #include "components/prefs/pref_service.h" | 14 #include "components/prefs/pref_service.h" |
| 15 #include "components/strings/grit/components_strings.h" |
15 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
16 #include "grit/components_strings.h" | |
17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
18 | 18 |
19 // static | 19 // static |
20 void ObsoleteSystemInfoBarDelegate::Create(InfoBarService* infobar_service) { | 20 void ObsoleteSystemInfoBarDelegate::Create(InfoBarService* infobar_service) { |
21 PrefService* local_state = g_browser_process->local_state(); | 21 PrefService* local_state = g_browser_process->local_state(); |
22 if (local_state && | 22 if (local_state && |
23 local_state->GetBoolean(prefs::kSuppressUnsupportedOSWarning)) { | 23 local_state->GetBoolean(prefs::kSuppressUnsupportedOSWarning)) { |
24 return; | 24 return; |
25 } | 25 } |
26 if (!ObsoleteSystem::IsObsoleteNowOrSoon()) | 26 if (!ObsoleteSystem::IsObsoleteNowOrSoon()) |
(...skipping 23 matching lines...) Expand all Loading... |
50 return BUTTON_NONE; | 50 return BUTTON_NONE; |
51 } | 51 } |
52 | 52 |
53 base::string16 ObsoleteSystemInfoBarDelegate::GetLinkText() const { | 53 base::string16 ObsoleteSystemInfoBarDelegate::GetLinkText() const { |
54 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 54 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
55 } | 55 } |
56 | 56 |
57 GURL ObsoleteSystemInfoBarDelegate::GetLinkURL() const { | 57 GURL ObsoleteSystemInfoBarDelegate::GetLinkURL() const { |
58 return GURL(ObsoleteSystem::GetLinkURL()); | 58 return GURL(ObsoleteSystem::GetLinkURL()); |
59 } | 59 } |
OLD | NEW |