OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_manager/task_manager_util.h" | 5 #include "chrome/browser/task_manager/task_manager_util.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/profiles/profile_info_cache.h" | 13 #include "chrome/browser/profiles/profile_info_cache.h" |
14 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 | 17 |
18 namespace task_manager { | 18 namespace task_manager { |
19 | 19 |
20 namespace util { | 20 namespace util { |
21 | 21 |
22 int GetMessagePrefixID(bool is_app, | 22 int GetMessagePrefixID(bool is_app, |
23 bool is_extension, | 23 bool is_extension, |
24 bool is_incognito, | 24 bool is_incognito, |
25 bool is_prerender, | 25 bool is_prerender, |
| 26 bool is_instant_overlay, |
26 bool is_background) { | 27 bool is_background) { |
27 if (is_app) { | 28 if (is_app) { |
28 if (is_background) | 29 if (is_background) |
29 return IDS_TASK_MANAGER_BACKGROUND_PREFIX; | 30 return IDS_TASK_MANAGER_BACKGROUND_PREFIX; |
30 if (is_incognito) | 31 if (is_incognito) |
31 return IDS_TASK_MANAGER_APP_INCOGNITO_PREFIX; | 32 return IDS_TASK_MANAGER_APP_INCOGNITO_PREFIX; |
32 return IDS_TASK_MANAGER_APP_PREFIX; | 33 return IDS_TASK_MANAGER_APP_PREFIX; |
33 } | 34 } |
34 if (is_extension) { | 35 if (is_extension) { |
35 if (is_incognito) | 36 if (is_incognito) |
36 return IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX; | 37 return IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX; |
37 return IDS_TASK_MANAGER_EXTENSION_PREFIX; | 38 return IDS_TASK_MANAGER_EXTENSION_PREFIX; |
38 } | 39 } |
39 if (is_prerender) | 40 if (is_prerender) |
40 return IDS_TASK_MANAGER_PRERENDER_PREFIX; | 41 return IDS_TASK_MANAGER_PRERENDER_PREFIX; |
| 42 if (is_instant_overlay) |
| 43 return IDS_TASK_MANAGER_INSTANT_OVERLAY_PREFIX; |
41 if (is_incognito) | 44 if (is_incognito) |
42 return IDS_TASK_MANAGER_TAB_INCOGNITO_PREFIX; | 45 return IDS_TASK_MANAGER_TAB_INCOGNITO_PREFIX; |
43 | 46 |
44 return IDS_TASK_MANAGER_TAB_PREFIX; | 47 return IDS_TASK_MANAGER_TAB_PREFIX; |
45 } | 48 } |
46 | 49 |
47 base::string16 GetProfileNameFromInfoCache(Profile* profile) { | 50 base::string16 GetProfileNameFromInfoCache(Profile* profile) { |
48 DCHECK(profile); | 51 DCHECK(profile); |
49 | 52 |
50 ProfileInfoCache& cache = | 53 ProfileInfoCache& cache = |
(...skipping 26 matching lines...) Expand all Loading... |
77 // web-based Email :BAT", in which the capital letters "BAT" stands for | 80 // web-based Email :BAT", in which the capital letters "BAT" stands for |
78 // the Hebrew word for "tab". | 81 // the Hebrew word for "tab". |
79 base::i18n::AdjustStringForLocaleDirection(&title); | 82 base::i18n::AdjustStringForLocaleDirection(&title); |
80 } | 83 } |
81 return title; | 84 return title; |
82 } | 85 } |
83 | 86 |
84 } // namespace util | 87 } // namespace util |
85 | 88 |
86 } // namespace task_manager | 89 } // namespace task_manager |
OLD | NEW |