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

Unified Diff: chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc

Issue 1834783003: Added the SuppressUnsupportedOSWarning policy setting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed policy_test_cases Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc
diff --git a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc
index 9bbad7574c55bb97e3ffc21778419f198a2d39ec..d2a54392035bba77208afdc01e06659793742509 100644
--- a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc
+++ b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc
@@ -4,17 +4,25 @@
#include "chrome/browser/ui/startup/obsolete_system_infobar_delegate.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/obsolete_system/obsolete_system.h"
+#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/chromium_strings.h"
#include "components/infobars/core/infobar.h"
+#include "components/prefs/pref_service.h"
#include "content/public/browser/web_contents.h"
#include "grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
// static
void ObsoleteSystemInfoBarDelegate::Create(InfoBarService* infobar_service) {
+ PrefService* local_state = g_browser_process->local_state();
+ if (local_state &&
+ local_state->GetBoolean(prefs::kSuppressUnsupportedOSWarning)) {
+ return;
+ }
if (!ObsoleteSystem::IsObsoleteNowOrSoon())
return;
infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(

Powered by Google App Engine
This is Rietveld 408576698