Timofey Chudakov | dffeeec7 | 2024-08-30 15:57:28 | [diff] [blame] | 1 | // Copyright 2024 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_UI_UTILS_H_ |
| 6 | #define COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_UI_UTILS_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include "components/plus_addresses/plus_address_types.h" |
| 11 | |
| 12 | namespace plus_addresses { |
| 13 | |
| 14 | // Returns a string for UI display computed from the `plus_address` facet URI. |
| 15 | // For Android origins, the package name is returned. For web origins, the |
| 16 | // formatted URL without the cryptographic scheme is returned. |
Jan Keitel | c643cb8 | 2024-09-10 14:43:33 | [diff] [blame^] | 17 | std::u16string GetOriginForDisplay(const PlusProfile& plus_address); |
Timofey Chudakov | dffeeec7 | 2024-08-30 15:57:28 | [diff] [blame] | 18 | |
| 19 | } // namespace plus_addresses |
| 20 | |
| 21 | #endif // COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_UI_UTILS_H_ |