Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8390)

Unified Diff: chrome/browser/ui/cocoa/passwords/passwords_list_view_controller.mm

Issue 1723583004: CREDENTIAL: Convert federations from URLs to origins throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iOS2 Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/passwords/passwords_list_view_controller.mm
diff --git a/chrome/browser/ui/cocoa/passwords/passwords_list_view_controller.mm b/chrome/browser/ui/cocoa/passwords/passwords_list_view_controller.mm
index a8b8f5053e09a9f9f55629efd02af227e0325de1..da2cd9b228466814d5ddf96a799011a037e862de 100644
--- a/chrome/browser/ui/cocoa/passwords/passwords_list_view_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/passwords_list_view_controller.mm
@@ -23,6 +23,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
#include "ui/resources/grit/ui_resources.h"
+#include "url/origin.h"
namespace {
@@ -136,12 +137,12 @@ NSTextField* FederationLabel(const base::string16& text) {
usernameField_.reset([UsernameLabel(GetDisplayUsername(form)) retain]);
[self addSubview:usernameField_];
- if (form.federation_url.is_empty()) {
+ if (form.federation_origin.unique()) {
passwordField_.reset([PasswordLabel(form.password_value) retain]);
} else {
base::string16 text = l10n_util::GetStringFUTF16(
IDS_PASSWORDS_VIA_FEDERATION,
- base::UTF8ToUTF16(form.federation_url.host()));
+ base::UTF8ToUTF16(form.federation_origin.host()));
passwordField_.reset([FederationLabel(text) retain]);
}
[self addSubview:passwordField_];
@@ -207,12 +208,12 @@ NSTextField* FederationLabel(const base::string16& text) {
usernameField_.reset([UsernameLabel(GetDisplayUsername(form)) retain]);
[self addSubview:usernameField_];
- if (form.federation_url.is_empty()) {
+ if (form.federation_origin.unique()) {
passwordField_.reset([PasswordLabel(form.password_value) retain]);
} else {
base::string16 text = l10n_util::GetStringFUTF16(
IDS_PASSWORDS_VIA_FEDERATION,
- base::UTF8ToUTF16(form.federation_url.host()));
+ base::UTF8ToUTF16(form.federation_origin.host()));
passwordField_.reset([FederationLabel(text) retain]);
}
[self addSubview:passwordField_];

Powered by Google App Engine
This is Rietveld 408576698