Commit 20377bfe authored by skau's avatar skau Committed by Commit bot

Revert "[CUPS] Fix the browser crash in CUPS settings UI in guest mode."

This reverts commit 194dc32c.

With https://codereview.chromium.org/2610373003/ enabling printing in
incognito, we can reenable printer setup in Guest Mode.

BUG=667395

Review-Url: https://codereview.chromium.org/2616003002
Cr-Commit-Position: refs/heads/master@{#441972}
parent 37c0c94c
...@@ -21,7 +21,6 @@ base::LazyInstance<PrinterPrefManagerFactory> g_printer_pref_manager = ...@@ -21,7 +21,6 @@ base::LazyInstance<PrinterPrefManagerFactory> g_printer_pref_manager =
// static // static
PrinterPrefManager* PrinterPrefManagerFactory::GetForBrowserContext( PrinterPrefManager* PrinterPrefManagerFactory::GetForBrowserContext(
content::BrowserContext* context) { content::BrowserContext* context) {
DCHECK(!context->IsOffTheRecord());
return static_cast<PrinterPrefManager*>( return static_cast<PrinterPrefManager*>(
GetInstance()->GetServiceForBrowserContext(context, true)); GetInstance()->GetServiceForBrowserContext(context, true));
} }
......
...@@ -709,8 +709,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) { ...@@ -709,8 +709,7 @@ void BrowserOptionsHandler::GetLocalizedValues(base::DictionaryValue* values) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
values->SetBoolean("cupsPrintEnabled", values->SetBoolean("cupsPrintEnabled",
base::CommandLine::ForCurrentProcess()->HasSwitch( base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableNativeCups) && ::switches::kEnableNativeCups));
!profile->IsOffTheRecord());
values->SetString("cupsPrintLearnMoreURL", values->SetString("cupsPrintLearnMoreURL",
chrome::kChromeUIMdCupsSettingsURL); chrome::kChromeUIMdCupsSettingsURL);
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
......
...@@ -1228,8 +1228,7 @@ void AddPeopleStrings(content::WebUIDataSource* html_source) { ...@@ -1228,8 +1228,7 @@ void AddPeopleStrings(content::WebUIDataSource* html_source) {
ProfileShortcutManager::IsFeatureEnabled()); ProfileShortcutManager::IsFeatureEnabled());
} }
void AddPrintingStrings(content::WebUIDataSource* html_source, void AddPrintingStrings(content::WebUIDataSource* html_source) {
Profile* profile) {
LocalizedString localized_strings[] = { LocalizedString localized_strings[] = {
{"printingPageTitle", IDS_SETTINGS_PRINTING}, {"printingPageTitle", IDS_SETTINGS_PRINTING},
{"printingCloudPrintLearnMoreLabel", {"printingCloudPrintLearnMoreLabel",
...@@ -1310,8 +1309,7 @@ void AddPrintingStrings(content::WebUIDataSource* html_source, ...@@ -1310,8 +1309,7 @@ void AddPrintingStrings(content::WebUIDataSource* html_source,
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
html_source->AddBoolean("showCupsPrintingFeatures", html_source->AddBoolean("showCupsPrintingFeatures",
base::CommandLine::ForCurrentProcess()->HasSwitch( base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableNativeCups) && ::switches::kEnableNativeCups));
!profile->IsOffTheRecord());
#endif #endif
} }
...@@ -1829,7 +1827,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, ...@@ -1829,7 +1827,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source,
AddOnStartupStrings(html_source); AddOnStartupStrings(html_source);
AddPasswordsAndFormsStrings(html_source); AddPasswordsAndFormsStrings(html_source);
AddPeopleStrings(html_source); AddPeopleStrings(html_source);
AddPrintingStrings(html_source, profile); AddPrintingStrings(html_source);
AddPrivacyStrings(html_source, profile); AddPrivacyStrings(html_source, profile);
AddResetStrings(html_source); AddResetStrings(html_source);
AddSearchEnginesStrings(html_source); AddSearchEnginesStrings(html_source);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment