| Index: chrome/browser/ui/passwords/manage_passwords_view_utils.cc
|
| diff --git a/chrome/browser/ui/passwords/manage_passwords_view_utils.cc b/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
|
| index f7314779c4ad26d8654c9cc34f8e96eee5f0f328..945088530e0947dce865a65ff2fd177149977842 100644
|
| --- a/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
|
| +++ b/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
|
| @@ -116,8 +116,13 @@ void GetSavePasswordDialogTitleTextAndLinkRange(
|
| l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK);
|
| replacements.insert(replacements.begin(), title_link);
|
| *title = l10n_util::GetStringFUTF16(title_id, replacements, &offsets);
|
| - *title_link_range =
|
| - gfx::Range(offsets[0], offsets[0] + title_link.length());
|
| + if (!offsets.empty()) {
|
| + // |offsets| can be empty when the localised string associated with
|
| + // |title_id| could not be found. While this situation is an error, it
|
| + // needs to be handled gracefully, see http://crbug.com/658902#c18.
|
| + *title_link_range =
|
| + gfx::Range(offsets[0], offsets[0] + title_link.length());
|
| + }
|
| } else {
|
| replacements.insert(
|
| replacements.begin(),
|
|
|