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, | |
27 bool is_background) { | 26 bool is_background) { |
28 if (is_app) { | 27 if (is_app) { |
29 if (is_background) | 28 if (is_background) |
30 return IDS_TASK_MANAGER_BACKGROUND_PREFIX; | 29 return IDS_TASK_MANAGER_BACKGROUND_PREFIX; |
31 if (is_incognito) | 30 if (is_incognito) |
32 return IDS_TASK_MANAGER_APP_INCOGNITO_PREFIX; | 31 return IDS_TASK_MANAGER_APP_INCOGNITO_PREFIX; |
33 return IDS_TASK_MANAGER_APP_PREFIX; | 32 return IDS_TASK_MANAGER_APP_PREFIX; |
34 } | 33 } |
35 if (is_extension) { | 34 if (is_extension) { |
36 if (is_incognito) | 35 if (is_incognito) |
37 return IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX; | 36 return IDS_TASK_MANAGER_EXTENSION_INCOGNITO_PREFIX; |
38 return IDS_TASK_MANAGER_EXTENSION_PREFIX; | 37 return IDS_TASK_MANAGER_EXTENSION_PREFIX; |
39 } | 38 } |
40 if (is_prerender) | 39 if (is_prerender) |
41 return IDS_TASK_MANAGER_PRERENDER_PREFIX; | 40 return IDS_TASK_MANAGER_PRERENDER_PREFIX; |
42 if (is_instant_overlay) | |
43 return IDS_TASK_MANAGER_INSTANT_OVERLAY_PREFIX; | |
44 if (is_incognito) | 41 if (is_incognito) |
45 return IDS_TASK_MANAGER_TAB_INCOGNITO_PREFIX; | 42 return IDS_TASK_MANAGER_TAB_INCOGNITO_PREFIX; |
46 | 43 |
47 return IDS_TASK_MANAGER_TAB_PREFIX; | 44 return IDS_TASK_MANAGER_TAB_PREFIX; |
48 } | 45 } |
49 | 46 |
50 base::string16 GetProfileNameFromInfoCache(Profile* profile) { | 47 base::string16 GetProfileNameFromInfoCache(Profile* profile) { |
51 DCHECK(profile); | 48 DCHECK(profile); |
52 | 49 |
53 ProfileInfoCache& cache = | 50 ProfileInfoCache& cache = |
(...skipping 26 matching lines...) Expand all Loading... |
80 // web-based Email :BAT", in which the capital letters "BAT" stands for | 77 // web-based Email :BAT", in which the capital letters "BAT" stands for |
81 // the Hebrew word for "tab". | 78 // the Hebrew word for "tab". |
82 base::i18n::AdjustStringForLocaleDirection(&title); | 79 base::i18n::AdjustStringForLocaleDirection(&title); |
83 } | 80 } |
84 return title; | 81 return title; |
85 } | 82 } |
86 | 83 |
87 } // namespace util | 84 } // namespace util |
88 | 85 |
89 } // namespace task_manager | 86 } // namespace task_manager |
OLD | NEW |