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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_password_items_view.cc

Issue 1151373006: Update Confirmation UI for saved password change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fixes Created 5 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/views/passwords/manage_password_items_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
6 6
7 #include <numeric> 7 #include <numeric>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" 10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return std::accumulate(row_views, row_views + arraysize(row_views), 0, 200 return std::accumulate(row_views, row_views + arraysize(row_views), 0,
201 [](int max_height, const views::View* view) { 201 [](int max_height, const views::View* view) {
202 return std::max(max_height, view->GetPreferredSize().height()); 202 return std::max(max_height, view->GetPreferredSize().height());
203 }); 203 });
204 } 204 }
205 205
206 void ManagePasswordItemsView::PasswordFormRow::AddCredentialsRow( 206 void ManagePasswordItemsView::PasswordFormRow::AddCredentialsRow(
207 views::GridLayout* layout) { 207 views::GridLayout* layout) {
208 ResetControls(); 208 ResetControls();
209 int column_set_id = 209 int column_set_id =
210 host_->model_->state() == password_manager::ui::PENDING_PASSWORD_STATE 210 host_->model_->state() == password_manager::ui::PENDING_PASSWORD_STATE ||
211 host_->model_->state() ==
vasilii 2015/07/31 14:38:53 I think now it's easier to check agains MANAGE_STA
dvadym 2015/08/03 15:44:08 Thanks, it's really easier
212 password_manager::ui::PENDING_PASSWORD_UPDATE_STATE
211 ? TWO_COLUMN_SET 213 ? TWO_COLUMN_SET
212 : THREE_COLUMN_SET; 214 : THREE_COLUMN_SET;
213 BuildColumnSetIfNeeded(layout, column_set_id); 215 BuildColumnSetIfNeeded(layout, column_set_id);
214 layout->StartRowWithPadding(0, column_set_id, 0, 216 layout->StartRowWithPadding(0, column_set_id, 0,
215 views::kRelatedControlVerticalSpacing); 217 views::kRelatedControlVerticalSpacing);
216 layout->AddView(GenerateUsernameLabel(*password_form_).release(), 1, 1, 218 layout->AddView(GenerateUsernameLabel(*password_form_).release(), 1, 1,
217 views::GridLayout::FILL, views::GridLayout::FILL, 219 views::GridLayout::FILL, views::GridLayout::FILL,
218 0, fixed_height_); 220 0, fixed_height_);
219 layout->AddView(GeneratePasswordLabel(*password_form_).release(), 1, 1, 221 layout->AddView(GeneratePasswordLabel(*password_form_).release(), 1, 1,
220 views::GridLayout::FILL, views::GridLayout::FILL, 222 views::GridLayout::FILL, views::GridLayout::FILL,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 deleted 298 deleted
297 ? ManagePasswordsBubbleModel::REMOVE_PASSWORD 299 ? ManagePasswordsBubbleModel::REMOVE_PASSWORD
298 : ManagePasswordsBubbleModel::ADD_PASSWORD); 300 : ManagePasswordsBubbleModel::ADD_PASSWORD);
299 } 301 }
300 302
301 void ManagePasswordItemsView::Refresh() { 303 void ManagePasswordItemsView::Refresh() {
302 DCHECK_NE(password_manager::ui::PENDING_PASSWORD_STATE, model_->state()); 304 DCHECK_NE(password_manager::ui::PENDING_PASSWORD_STATE, model_->state());
303 RemoveAllChildViews(true); 305 RemoveAllChildViews(true);
304 AddRows(); 306 AddRows();
305 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698