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

Unified Diff: chrome/service/service_process.cc

Issue 10958052: Removed unnecessary returning by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « chrome/service/cloud_print/connector_settings.cc ('k') | chrome/service/service_process_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_process.cc
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index d585f30b076ce195f0ba58d4433744ce17b05155..21d8334cdd6b58256eaf1e729d8dada6c47cbd64 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -175,7 +175,7 @@ bool ServiceProcess::Initialize(MessageLoopForUI* message_loop,
} else {
// If no command-line value was specified, read the last used locale from
// the prefs.
- service_prefs_->GetString(prefs::kApplicationLocale, &locale);
+ locale = service_prefs_->GetString(prefs::kApplicationLocale, "");
// If no locale was specified anywhere, use the default one.
if (locale.empty())
locale = kDefaultServiceProcessLocale;
@@ -185,23 +185,13 @@ bool ServiceProcess::Initialize(MessageLoopForUI* message_loop,
PrepareRestartOnCrashEnviroment(command_line);
// Enable Cloud Print if needed. First check the command-line.
- bool cloud_print_proxy_enabled =
- command_line.HasSwitch(switches::kEnableCloudPrintProxy);
- if (!cloud_print_proxy_enabled) {
- // Then check if the cloud print proxy was previously enabled.
- service_prefs_->GetBoolean(prefs::kCloudPrintProxyEnabled,
- &cloud_print_proxy_enabled);
- }
-
- if (cloud_print_proxy_enabled) {
+ // Then check if the cloud print proxy was previously enabled.
+ if (command_line.HasSwitch(switches::kEnableCloudPrintProxy) ||
+ service_prefs_->GetBoolean(prefs::kCloudPrintProxyEnabled, false)) {
GetCloudPrintProxy()->EnableForUser(lsid);
}
// Enable Virtual Printer Driver if needed.
- bool virtual_printer_driver_enabled = false;
- service_prefs_->GetBoolean(prefs::kVirtualPrinterDriverEnabled,
- &virtual_printer_driver_enabled);
-
- if (virtual_printer_driver_enabled) {
+ if (service_prefs_->GetBoolean(prefs::kVirtualPrinterDriverEnabled, false)) {
// Register the fact that there is at least one
// service needing the process.
OnServiceEnabled();
« no previous file with comments | « chrome/service/cloud_print/connector_settings.cc ('k') | chrome/service/service_process_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698