summaryrefslogtreecommitdiffstats
path: root/chrome/service/service_process.cc
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-23 03:51:41 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-23 03:51:41 +0000
commit6d1db74e78ec273a01ea98c80f0b5cd7a1ca84e9 (patch)
treed835b44f8164021a7d6c05f079289d3846463848 /chrome/service/service_process.cc
parentcc2331c2216436ab71e39d31b872b3f48f741635 (diff)
downloadchromium_src-6d1db74e78ec273a01ea98c80f0b5cd7a1ca84e9.zip
chromium_src-6d1db74e78ec273a01ea98c80f0b5cd7a1ca84e9.tar.gz
chromium_src-6d1db74e78ec273a01ea98c80f0b5cd7a1ca84e9.tar.bz2
Removed unnecessary returning by reference to simplify code.
BUG=137129 Review URL: https://chromiumcodereview.appspot.com/10958052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/service_process.cc')
-rw-r--r--chrome/service/service_process.cc20
1 files changed, 5 insertions, 15 deletions
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index d585f30..21d8334 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();