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

Unified Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 2535303003: [CUPS] Fix the browser crash in CUPS settings UI in guest mode. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
index e51110a711d016d2690bd522b177b563e444e4cd..840bbb8d2a472c77d6805a1b9e53ec12466de183 100644
--- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
+++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -1194,7 +1194,8 @@ void AddPeopleStrings(content::WebUIDataSource* html_source) {
ProfileShortcutManager::IsFeatureEnabled());
}
-void AddPrintingStrings(content::WebUIDataSource* html_source) {
+void AddPrintingStrings(content::WebUIDataSource* html_source,
+ Profile* profile) {
LocalizedString localized_strings[] = {
{"printingPageTitle", IDS_SETTINGS_PRINTING},
{"printingCloudPrintLearnMoreLabel",
@@ -1275,7 +1276,8 @@ void AddPrintingStrings(content::WebUIDataSource* html_source) {
#if defined(OS_CHROMEOS)
html_source->AddBoolean("showCupsPrintingFeatures",
base::CommandLine::ForCurrentProcess()->HasSwitch(
- ::switches::kEnableNativeCups));
+ ::switches::kEnableNativeCups) &&
+ !profile->IsOffTheRecord());
#endif
}
@@ -1787,7 +1789,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source,
AddOnStartupStrings(html_source);
AddPasswordsAndFormsStrings(html_source);
AddPeopleStrings(html_source);
- AddPrintingStrings(html_source);
+ AddPrintingStrings(html_source, profile);
AddPrivacyStrings(html_source, profile);
AddResetStrings(html_source);
AddSearchEnginesStrings(html_source);
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698