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

Side by Side Diff: chrome/browser/password_manager/save_password_infobar_delegate.cc

Issue 1717263002: [Smart Lock, UI] Fix title for federated credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/password_manager/save_password_infobar_delegate.h" 5 #include "chrome/browser/password_manager/save_password_infobar_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (!uma_histogram_suffix_.empty()) { 89 if (!uma_histogram_suffix_.empty()) {
90 password_manager::metrics_util::LogUMAHistogramBoolean( 90 password_manager::metrics_util::LogUMAHistogramBoolean(
91 "PasswordManager.SavePasswordPromptDisplayed_" + uma_histogram_suffix_, 91 "PasswordManager.SavePasswordPromptDisplayed_" + uma_histogram_suffix_,
92 true); 92 true);
93 } 93 }
94 base::string16 message; 94 base::string16 message;
95 gfx::Range message_link_range = gfx::Range(); 95 gfx::Range message_link_range = gfx::Range();
96 PasswordTittleType type = 96 PasswordTittleType type =
97 form_to_save_->pending_credentials().federation_url.is_empty() 97 form_to_save_->pending_credentials().federation_url.is_empty()
98 ? PasswordTittleType::SAVE_PASSWORD 98 ? PasswordTittleType::SAVE_PASSWORD
99 : PasswordTittleType::UPDATE_PASSWORD; 99 : PasswordTittleType::SAVE_ACCOUNT;
100 GetSavePasswordDialogTitleTextAndLinkRange( 100 GetSavePasswordDialogTitleTextAndLinkRange(
101 web_contents->GetVisibleURL(), form_to_save_->observed_form().origin, 101 web_contents->GetVisibleURL(), form_to_save_->observed_form().origin,
102 is_smartlock_branding_enabled, type, 102 is_smartlock_branding_enabled, type,
103 &message, &message_link_range); 103 &message, &message_link_range);
104 SetMessage(message); 104 SetMessage(message);
105 SetMessageLinkRange(message_link_range); 105 SetMessageLinkRange(message_link_range);
106 } 106 }
107 107
108 base::string16 SavePasswordInfoBarDelegate::GetFirstRunExperienceMessage() { 108 base::string16 SavePasswordInfoBarDelegate::GetFirstRunExperienceMessage() {
109 return should_show_first_run_experience_ 109 return should_show_first_run_experience_
(...skipping 25 matching lines...) Expand all
135 infobar_response_ = password_manager::metrics_util::REMEMBER_PASSWORD; 135 infobar_response_ = password_manager::metrics_util::REMEMBER_PASSWORD;
136 return true; 136 return true;
137 } 137 }
138 138
139 bool SavePasswordInfoBarDelegate::Cancel() { 139 bool SavePasswordInfoBarDelegate::Cancel() {
140 DCHECK(form_to_save_.get()); 140 DCHECK(form_to_save_.get());
141 form_to_save_->PermanentlyBlacklist(); 141 form_to_save_->PermanentlyBlacklist();
142 infobar_response_ = password_manager::metrics_util::NEVER_REMEMBER_PASSWORD; 142 infobar_response_ = password_manager::metrics_util::NEVER_REMEMBER_PASSWORD;
143 return true; 143 return true;
144 } 144 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698