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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_view_utils.cc

Issue 1787653002: Password update bubble UI improvement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/passwords/manage_passwords_view_utils.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 break; 91 break;
92 case PasswordTittleType::UPDATE_PASSWORD: 92 case PasswordTittleType::UPDATE_PASSWORD:
93 title_id = IDS_UPDATE_PASSWORD; 93 title_id = IDS_UPDATE_PASSWORD;
94 break; 94 break;
95 } 95 }
96 96
97 // Check whether the registry controlled domains for user-visible URL (i.e. 97 // Check whether the registry controlled domains for user-visible URL (i.e.
98 // the one seen in the omnibox) and the password form post-submit navigation 98 // the one seen in the omnibox) and the password form post-submit navigation
99 // URL differs or not. 99 // URL differs or not.
100 if (!SameDomainOrHost(user_visible_url, form_origin_url)) { 100 if (!SameDomainOrHost(user_visible_url, form_origin_url)) {
101 title_id = IDS_SAVE_PASSWORD_TITLE; 101 title_id = dialog_type == PasswordTittleType::UPDATE_PASSWORD
102 ? IDS_UPDATE_PASSWORD_DIFFERENT_DOMAINS_TITLE
103 : IDS_SAVE_PASSWORD_DIFFERENT_DOMAINS_TITLE;
102 // TODO(palmer): Look into passing real language prefs here, not "". 104 // TODO(palmer): Look into passing real language prefs here, not "".
103 // crbug.com/498069. 105 // crbug.com/498069.
104 replacements.push_back(url_formatter::FormatUrlForSecurityDisplay( 106 replacements.push_back(url_formatter::FormatUrlForSecurityDisplay(
105 form_origin_url, std::string())); 107 form_origin_url, std::string()));
106 } 108 }
107 109
108 if (is_smartlock_branding_enabled) { 110 if (is_smartlock_branding_enabled) {
109 // "Google Smart Lock" should be a hyperlink. 111 // "Google Smart Lock" should be a hyperlink.
110 base::string16 title_link = 112 base::string16 title_link =
111 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK); 113 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 : form.username_value; 177 : form.username_value;
176 } 178 }
177 179
178 bool IsSyncingAutosignSetting(Profile* profile) { 180 bool IsSyncingAutosignSetting(Profile* profile) {
179 const ProfileSyncService* sync_service = 181 const ProfileSyncService* sync_service =
180 ProfileSyncServiceFactory::GetForProfile(profile); 182 ProfileSyncServiceFactory::GetForProfile(profile);
181 return (sync_service && sync_service->IsFirstSetupComplete() && 183 return (sync_service && sync_service->IsFirstSetupComplete() &&
182 sync_service->IsSyncActive() && 184 sync_service->IsSyncActive() &&
183 sync_service->GetActiveDataTypes().Has(syncer::PRIORITY_PREFERENCES)); 185 sync_service->GetActiveDataTypes().Has(syncer::PRIORITY_PREFERENCES));
184 } 186 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698