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

Unified Diff: chrome/common/localized_error.cc

Issue 977323003: Disable easter egg on enterprised enrolled devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove debug, fix indentation in JS Created 5 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/common/localized_error.cc
diff --git a/chrome/common/localized_error.cc b/chrome/common/localized_error.cc
index 5472b778567b20b01b83a26fdb3b89f29467a38d..f7bf713e4b261a439935ea68729c3618b9b92ae4 100644
--- a/chrome/common/localized_error.cc
+++ b/chrome/common/localized_error.cc
@@ -26,6 +26,11 @@
#include "base/win/windows_version.h"
#endif
+#if defined(OS_CHROMEOS)
+#include "base/command_line.h"
+#include "chrome/common/chrome_switches.h"
+#endif
+
#if defined(ENABLE_EXTENSIONS)
#include "extensions/common/constants.h"
#include "extensions/common/extension_icon_set.h"
@@ -566,6 +571,18 @@ void LocalizedError::GetStrings(int error_code,
error_code == chrome_common_net::DNS_PROBE_FINISHED_NO_INTERNET) {
error_strings->SetString("primaryParagraph",
l10n_util::GetStringUTF16(options.summary_resource_id));
+
+#if defined(OS_CHROMEOS)
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+
+ // Check if easter egg should be disabled.
+ if (command_line->HasSwitch(switches::kDisableDinosaurEasterEgg)) {
+ // The prescence of this string disables the easter egg. Acts as a flag.
+ error_strings->SetString("disabledEasterEgg",
+ l10n_util::GetStringUTF16(IDS_ERRORPAGE_FUN_DISABLED));
+ }
+#endif
+
} else {
// Set summary message in the details.
summary->SetString("msg",
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | chrome/renderer/resources/default_100_percent/offline/100-disabled.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698