OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/location_bar/origin_chip_info.h" | 5 #include "chrome/browser/ui/location_bar/origin_chip_info.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 if (host == chrome::kChromeUIHelpHost) | 62 if (host == chrome::kChromeUIHelpHost) |
63 return IDS_ABOUT_TITLE; | 63 return IDS_ABOUT_TITLE; |
64 if (host == chrome::kChromeUIHistoryHost) | 64 if (host == chrome::kChromeUIHistoryHost) |
65 return IDS_HISTORY_TITLE; | 65 return IDS_HISTORY_TITLE; |
66 if (host == chrome::kChromeUINewTabHost) | 66 if (host == chrome::kChromeUINewTabHost) |
67 return IDS_NEW_TAB_TITLE; | 67 return IDS_NEW_TAB_TITLE; |
68 if (host == chrome::kChromeUIPluginsHost) | 68 if (host == chrome::kChromeUIPluginsHost) |
69 return IDS_PLUGINS_TITLE; | 69 return IDS_PLUGINS_TITLE; |
70 if (host == chrome::kChromeUIPolicyHost) | 70 if (host == chrome::kChromeUIPolicyHost) |
71 return IDS_POLICY_TITLE; | 71 return IDS_POLICY_TITLE; |
| 72 #if defined(ENABLE_FULL_PRINTING) |
72 if (host == chrome::kChromeUIPrintHost) | 73 if (host == chrome::kChromeUIPrintHost) |
73 return IDS_PRINT_PREVIEW_TITLE; | 74 return IDS_PRINT_PREVIEW_TITLE; |
| 75 #endif // ENABLE_FULL_PRINTING |
74 if (host == chrome::kChromeUISettingsHost) | 76 if (host == chrome::kChromeUISettingsHost) |
75 return IDS_SETTINGS_TITLE; | 77 return IDS_SETTINGS_TITLE; |
76 if (host == chrome::kChromeUIVersionHost) | 78 if (host == chrome::kChromeUIVersionHost) |
77 return IDS_ABOUT_VERSION_TITLE; | 79 return IDS_ABOUT_VERSION_TITLE; |
78 | 80 |
79 return -1; | 81 return -1; |
80 } | 82 } |
81 | 83 |
82 } // namespace | 84 } // namespace |
83 | 85 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 253 |
252 #if defined(OS_CHROMEOS) | 254 #if defined(OS_CHROMEOS) |
253 if (url.SchemeIs(chrome::kCrosScheme) || | 255 if (url.SchemeIs(chrome::kCrosScheme) || |
254 url.SchemeIs(chrome::kDriveScheme)) | 256 url.SchemeIs(chrome::kDriveScheme)) |
255 return base::UTF8ToUTF16(url.spec()); | 257 return base::UTF8ToUTF16(url.spec()); |
256 #endif | 258 #endif |
257 | 259 |
258 // If all else fails, return the hostname. | 260 // If all else fails, return the hostname. |
259 return base::UTF8ToUTF16(url.host()); | 261 return base::UTF8ToUTF16(url.host()); |
260 } | 262 } |
OLD | NEW |