OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/service/service_process.h" | 5 #include "chrome/service/service_process.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 service_prefs_->WritePrefs(); | 170 service_prefs_->WritePrefs(); |
171 } else { | 171 } else { |
172 // If no command-line value was specified, read the last used locale from | 172 // If no command-line value was specified, read the last used locale from |
173 // the prefs. | 173 // the prefs. |
174 locale = | 174 locale = |
175 service_prefs_->GetString(prefs::kApplicationLocale, std::string()); | 175 service_prefs_->GetString(prefs::kApplicationLocale, std::string()); |
176 // If no locale was specified anywhere, use the default one. | 176 // If no locale was specified anywhere, use the default one. |
177 if (locale.empty()) | 177 if (locale.empty()) |
178 locale = kDefaultServiceProcessLocale; | 178 locale = kDefaultServiceProcessLocale; |
179 } | 179 } |
180 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL); | 180 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 181 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
181 | 182 |
182 PrepareRestartOnCrashEnviroment(command_line); | 183 PrepareRestartOnCrashEnviroment(command_line); |
183 | 184 |
184 // Enable Cloud Print if needed. First check the command-line. | 185 // Enable Cloud Print if needed. First check the command-line. |
185 // Then check if the cloud print proxy was previously enabled. | 186 // Then check if the cloud print proxy was previously enabled. |
186 if (command_line.HasSwitch(switches::kEnableCloudPrintProxy) || | 187 if (command_line.HasSwitch(switches::kEnableCloudPrintProxy) || |
187 service_prefs_->GetBoolean(prefs::kCloudPrintProxyEnabled, false)) { | 188 service_prefs_->GetBoolean(prefs::kCloudPrintProxyEnabled, false)) { |
188 GetCloudPrintProxy()->EnableForUser(); | 189 GetCloudPrintProxy()->EnableForUser(); |
189 } | 190 } |
190 | 191 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 if (enabled_services_ && !ipc_server_->is_client_connected()) { | 364 if (enabled_services_ && !ipc_server_->is_client_connected()) { |
364 GetCloudPrintProxy()->CheckCloudPrintProxyPolicy(); | 365 GetCloudPrintProxy()->CheckCloudPrintProxyPolicy(); |
365 } | 366 } |
366 ScheduleCloudPrintPolicyCheck(); | 367 ScheduleCloudPrintPolicyCheck(); |
367 } | 368 } |
368 | 369 |
369 ServiceProcess::~ServiceProcess() { | 370 ServiceProcess::~ServiceProcess() { |
370 Teardown(); | 371 Teardown(); |
371 g_service_process = NULL; | 372 g_service_process = NULL; |
372 } | 373 } |
OLD | NEW |