| Index: components/password_manager/core/browser/password_ui_utils.cc
|
| diff --git a/components/password_manager/core/browser/password_ui_utils.cc b/components/password_manager/core/browser/password_ui_utils.cc
|
| index 239213192858277e3234f5713582700c7099205d..e2567805c8f7bfed2cbe342d8ddee8391d7d9fee 100644
|
| --- a/components/password_manager/core/browser/password_ui_utils.cc
|
| +++ b/components/password_manager/core/browser/password_ui_utils.cc
|
| @@ -6,6 +6,8 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/strings/string_piece.h"
|
| +#include "base/strings/string_split.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "components/autofill/core/common/password_form.h"
|
| @@ -21,6 +23,16 @@ const char* const kRemovedPrefixes[] = {"m.", "mobile.", "www."};
|
|
|
| } // namespace
|
|
|
| +const int kAndroidAppSchemeAndDelimiterLength = 10; // Length of 'android://'.
|
| +
|
| +// Reverse order of subdomains in hostname.
|
| +std::string SplitByDotAndReverse(base::StringPiece host) {
|
| + std::vector<std::string> parts =
|
| + base::SplitString(host, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
| + std::reverse(parts.begin(), parts.end());
|
| + return base::JoinString(parts, ".");
|
| +}
|
| +
|
| std::string GetShownOriginAndLinkUrl(
|
| const autofill::PasswordForm& password_form,
|
| bool* is_android_uri,
|
|
|