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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 if (host == chrome::kChromeUIHelpHost) | 64 if (host == chrome::kChromeUIHelpHost) |
65 return IDS_ABOUT_TITLE; | 65 return IDS_ABOUT_TITLE; |
66 if (host == chrome::kChromeUIHistoryHost) | 66 if (host == chrome::kChromeUIHistoryHost) |
67 return IDS_HISTORY_TITLE; | 67 return IDS_HISTORY_TITLE; |
68 if (host == chrome::kChromeUINewTabHost) | 68 if (host == chrome::kChromeUINewTabHost) |
69 return IDS_NEW_TAB_TITLE; | 69 return IDS_NEW_TAB_TITLE; |
70 if (host == chrome::kChromeUIPluginsHost) | 70 if (host == chrome::kChromeUIPluginsHost) |
71 return IDS_PLUGINS_TITLE; | 71 return IDS_PLUGINS_TITLE; |
72 if (host == chrome::kChromeUIPolicyHost) | 72 if (host == chrome::kChromeUIPolicyHost) |
73 return IDS_POLICY_TITLE; | 73 return IDS_POLICY_TITLE; |
74 #if defined(ENABLE_FULL_PRINTING) | 74 #if defined(ENABLE_PRINT_PREVIEW) |
75 if (host == chrome::kChromeUIPrintHost) | 75 if (host == chrome::kChromeUIPrintHost) |
76 return IDS_PRINT_PREVIEW_TITLE; | 76 return IDS_PRINT_PREVIEW_TITLE; |
77 #endif // ENABLE_FULL_PRINTING | 77 #endif // ENABLE_PRINT_PREVIEW |
78 if (host == chrome::kChromeUISettingsHost) | 78 if (host == chrome::kChromeUISettingsHost) |
79 return IDS_SETTINGS_TITLE; | 79 return IDS_SETTINGS_TITLE; |
80 if (host == chrome::kChromeUIVersionHost) | 80 if (host == chrome::kChromeUIVersionHost) |
81 return IDS_ABOUT_VERSION_TITLE; | 81 return IDS_ABOUT_VERSION_TITLE; |
82 | 82 |
83 return -1; | 83 return -1; |
84 } | 84 } |
85 | 85 |
86 } // namespace | 86 } // namespace |
87 | 87 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 #if defined(OS_CHROMEOS) | 256 #if defined(OS_CHROMEOS) |
257 if (url.SchemeIs(chrome::kCrosScheme) || | 257 if (url.SchemeIs(chrome::kCrosScheme) || |
258 url.SchemeIs(chrome::kExternalFileScheme)) | 258 url.SchemeIs(chrome::kExternalFileScheme)) |
259 return base::UTF8ToUTF16(url.spec()); | 259 return base::UTF8ToUTF16(url.spec()); |
260 #endif | 260 #endif |
261 | 261 |
262 // If all else fails, return the hostname. | 262 // If all else fails, return the hostname. |
263 return base::UTF8ToUTF16(url.host()); | 263 return base::UTF8ToUTF16(url.host()); |
264 } | 264 } |
OLD | NEW |