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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 return; | 94 return; |
95 | 95 |
96 // If the known command-line test options are used we don't create the | 96 // If the known command-line test options are used we don't create the |
97 // environment block which means we don't get the restart dialog. | 97 // environment block which means we don't get the restart dialog. |
98 if (parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) | 98 if (parsed_command_line.HasSwitch(switches::kNoErrorDialogs)) |
99 return; | 99 return; |
100 | 100 |
101 // The encoding we use for the info is "title|context|direction" where | 101 // The encoding we use for the info is "title|context|direction" where |
102 // direction is either env_vars::kRtlLocale or env_vars::kLtrLocale depending | 102 // direction is either env_vars::kRtlLocale or env_vars::kLtrLocale depending |
103 // on the current locale. | 103 // on the current locale. |
104 string16 dlg_strings(l10n_util::GetStringUTF16(IDS_CRASH_RECOVERY_TITLE)); | 104 base::string16 dlg_strings( |
| 105 l10n_util::GetStringUTF16(IDS_CRASH_RECOVERY_TITLE)); |
105 dlg_strings.push_back('|'); | 106 dlg_strings.push_back('|'); |
106 string16 adjusted_string( | 107 base::string16 adjusted_string(l10n_util::GetStringFUTF16( |
107 l10n_util::GetStringFUTF16(IDS_SERVICE_CRASH_RECOVERY_CONTENT, | 108 IDS_SERVICE_CRASH_RECOVERY_CONTENT, |
108 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); | 109 l10n_util::GetStringUTF16(IDS_GOOGLE_CLOUD_PRINT))); |
109 base::i18n::AdjustStringForLocaleDirection(&adjusted_string); | 110 base::i18n::AdjustStringForLocaleDirection(&adjusted_string); |
110 dlg_strings.append(adjusted_string); | 111 dlg_strings.append(adjusted_string); |
111 dlg_strings.push_back('|'); | 112 dlg_strings.push_back('|'); |
112 dlg_strings.append(ASCIIToUTF16( | 113 dlg_strings.append(ASCIIToUTF16( |
113 base::i18n::IsRTL() ? env_vars::kRtlLocale : env_vars::kLtrLocale)); | 114 base::i18n::IsRTL() ? env_vars::kRtlLocale : env_vars::kLtrLocale)); |
114 | 115 |
115 env->SetVar(env_vars::kRestartInfo, UTF16ToUTF8(dlg_strings)); | 116 env->SetVar(env_vars::kRestartInfo, UTF16ToUTF8(dlg_strings)); |
116 } | 117 } |
117 | 118 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 if (enabled_services_ && !ipc_server_->is_client_connected()) { | 382 if (enabled_services_ && !ipc_server_->is_client_connected()) { |
382 GetCloudPrintProxy()->CheckCloudPrintProxyPolicy(); | 383 GetCloudPrintProxy()->CheckCloudPrintProxyPolicy(); |
383 } | 384 } |
384 ScheduleCloudPrintPolicyCheck(); | 385 ScheduleCloudPrintPolicyCheck(); |
385 } | 386 } |
386 | 387 |
387 ServiceProcess::~ServiceProcess() { | 388 ServiceProcess::~ServiceProcess() { |
388 Teardown(); | 389 Teardown(); |
389 g_service_process = NULL; | 390 g_service_process = NULL; |
390 } | 391 } |
OLD | NEW |