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/toolbar/origin_chip_info.h" | 5 #include "chrome/browser/ui/toolbar/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_icon_image.h" | 10 #include "chrome/browser/extensions/extension_icon_image.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 return IDS_CRASHES_TITLE; | 52 return IDS_CRASHES_TITLE; |
53 #if defined(ENABLE_SERVICE_DISCOVERY) | 53 #if defined(ENABLE_SERVICE_DISCOVERY) |
54 if (host == chrome::kChromeUIDevicesHost) | 54 if (host == chrome::kChromeUIDevicesHost) |
55 return IDS_LOCAL_DISCOVERY_DEVICES_PAGE_TITLE; | 55 return IDS_LOCAL_DISCOVERY_DEVICES_PAGE_TITLE; |
56 #endif // ENABLE_SERVICE_DISCOVERY | 56 #endif // ENABLE_SERVICE_DISCOVERY |
57 if (host == chrome::kChromeUIDownloadsHost) | 57 if (host == chrome::kChromeUIDownloadsHost) |
58 return IDS_DOWNLOAD_TITLE; | 58 return IDS_DOWNLOAD_TITLE; |
59 if (host == chrome::kChromeUIExtensionsHost) | 59 if (host == chrome::kChromeUIExtensionsHost) |
60 return IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE; | 60 return IDS_MANAGE_EXTENSIONS_SETTING_WINDOWS_TITLE; |
61 if (host == chrome::kChromeUIHelpHost) | 61 if (host == chrome::kChromeUIHelpHost) |
62 return IDS_ABOUT_TAB_TITLE; | 62 return IDS_ABOUT_TITLE; |
63 if (host == chrome::kChromeUIHistoryHost) | 63 if (host == chrome::kChromeUIHistoryHost) |
64 return IDS_HISTORY_TITLE; | 64 return IDS_HISTORY_TITLE; |
65 if (host == chrome::kChromeUINewTabHost) | 65 if (host == chrome::kChromeUINewTabHost) |
66 return IDS_NEW_TAB_TITLE; | 66 return IDS_NEW_TAB_TITLE; |
67 if (host == chrome::kChromeUIPluginsHost) | 67 if (host == chrome::kChromeUIPluginsHost) |
68 return IDS_PLUGINS_TITLE; | 68 return IDS_PLUGINS_TITLE; |
69 if (host == chrome::kChromeUIPolicyHost) | 69 if (host == chrome::kChromeUIPolicyHost) |
70 return IDS_POLICY_TITLE; | 70 return IDS_POLICY_TITLE; |
71 if (host == chrome::kChromeUIPrintHost) | 71 if (host == chrome::kChromeUIPrintHost) |
72 return IDS_PRINT_PREVIEW_TITLE; | 72 return IDS_PRINT_PREVIEW_TITLE; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 #if defined(OS_CHROMEOS) | 248 #if defined(OS_CHROMEOS) |
249 if (url.SchemeIs(chrome::kCrosScheme) || | 249 if (url.SchemeIs(chrome::kCrosScheme) || |
250 url.SchemeIs(chrome::kDriveScheme)) | 250 url.SchemeIs(chrome::kDriveScheme)) |
251 return base::UTF8ToUTF16(url.spec()); | 251 return base::UTF8ToUTF16(url.spec()); |
252 #endif | 252 #endif |
253 | 253 |
254 // If all else fails, return the hostname. | 254 // If all else fails, return the hostname. |
255 return base::UTF8ToUTF16(url.host()); | 255 return base::UTF8ToUTF16(url.host()); |
256 } | 256 } |
OLD | NEW |