OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser/task_management/providers/web_contents/renderer_task.h" | 5 #include "chrome/browser/task_management/providers/web_contents/renderer_task.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/numerics/safe_conversions.h" | 8 #include "base/numerics/safe_conversions.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 return nullptr; | 174 return nullptr; |
175 | 175 |
176 return image.ToImageSkia(); | 176 return image.ToImageSkia(); |
177 } | 177 } |
178 | 178 |
179 // static | 179 // static |
180 const base::string16 RendererTask::PrefixRendererTitle( | 180 const base::string16 RendererTask::PrefixRendererTitle( |
181 const base::string16& title, | 181 const base::string16& title, |
182 bool is_app, | 182 bool is_app, |
183 bool is_extension, | 183 bool is_extension, |
184 bool is_incognito) { | 184 bool is_incognito, |
| 185 bool is_background) { |
185 int message_id = IDS_TASK_MANAGER_TAB_PREFIX; | 186 int message_id = IDS_TASK_MANAGER_TAB_PREFIX; |
186 | 187 |
187 if (is_incognito && !is_app && !is_extension) { | 188 if (is_incognito && !is_app && !is_extension) { |
188 message_id = IDS_TASK_MANAGER_TAB_INCOGNITO_PREFIX; | 189 message_id = IDS_TASK_MANAGER_TAB_INCOGNITO_PREFIX; |
189 } else if (is_app) { | 190 } else if (is_app) { |
190 if (is_incognito) | 191 if (is_background) |
| 192 message_id = IDS_TASK_MANAGER_BACKGROUND_PREFIX; |
| 193 else if (is_incognito) |
191 message_id = IDS_TASK_MANAGER_APP_INCOGNITO_PREFIX; | 194 message_id = IDS_TASK_MANAGER_APP_INCOGNITO_PREFIX; |
192 else | 195 else |
193 message_id = IDS_TASK_MANAGER_APP_PREFIX; | 196 message_id = IDS_TASK_MANAGER_APP_PREFIX; |
194 } else if (is_extension) { | 197 } else if (is_extension) { |
195 if (is_incognito) | 198 if (is_incognito) |
196 message_id = IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX; | 199 message_id = IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX; |
197 else | 200 else |
198 message_id = IDS_TASK_MANAGER_EXTENSION_PREFIX; | 201 message_id = IDS_TASK_MANAGER_EXTENSION_PREFIX; |
199 } | 202 } |
200 | 203 |
201 return l10n_util::GetStringFUTF16(message_id, title); | 204 return l10n_util::GetStringFUTF16(message_id, title); |
202 } | 205 } |
203 | 206 |
204 } // namespace task_management | 207 } // namespace task_management |
OLD | NEW |