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

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

Issue 1162583003: Credential Management: Rename 'LocalCredential' to 'PasswordCredential' (2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@drop
Patch Set: Fix. Created 5 years, 6 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/views/passwords/manage_credential_item_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_credential_item_view.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" 8 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h"
9 #include "chrome/browser/ui/views/passwords/credentials_item_view.h" 9 #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 ManagePasswordsBubbleModel* model, 51 ManagePasswordsBubbleModel* model,
52 const autofill::PasswordForm* password_form) 52 const autofill::PasswordForm* password_form)
53 : form_(password_form), 53 : form_(password_form),
54 delete_button_(nullptr), 54 delete_button_(nullptr),
55 undo_link_(nullptr), 55 undo_link_(nullptr),
56 model_(model), 56 model_(model),
57 form_deleted_(false) { 57 form_deleted_(false) {
58 net::URLRequestContextGetter* request_context = 58 net::URLRequestContextGetter* request_context =
59 model_->GetProfile()->GetRequestContext(); 59 model_->GetProfile()->GetRequestContext();
60 credential_button_.reset(new CredentialsItemView( 60 credential_button_.reset(new CredentialsItemView(
61 this, form_, password_manager::CredentialType::CREDENTIAL_TYPE_LOCAL, 61 this, form_, password_manager::CredentialType::CREDENTIAL_TYPE_PASSWORD,
62 CredentialsItemView::ACCOUNT_CHOOSER, request_context)); 62 CredentialsItemView::ACCOUNT_CHOOSER, request_context));
63 credential_button_->set_owned_by_client(); 63 credential_button_->set_owned_by_client();
64 credential_button_->SetEnabled(false); 64 credential_button_->SetEnabled(false);
65 Refresh(); 65 Refresh();
66 } 66 }
67 67
68 ManageCredentialItemView::~ManageCredentialItemView() { 68 ManageCredentialItemView::~ManageCredentialItemView() {
69 } 69 }
70 70
71 void ManageCredentialItemView::Refresh() { 71 void ManageCredentialItemView::Refresh() {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 Refresh(); 113 Refresh();
114 } 114 }
115 115
116 void ManageCredentialItemView::LinkClicked(views::Link* source, 116 void ManageCredentialItemView::LinkClicked(views::Link* source,
117 int event_flags) { 117 int event_flags) {
118 DCHECK_EQ(undo_link_, source); 118 DCHECK_EQ(undo_link_, source);
119 form_deleted_ = false; 119 form_deleted_ = false;
120 model_->OnPasswordAction(*form_, ManagePasswordsBubbleModel::ADD_PASSWORD); 120 model_->OnPasswordAction(*form_, ManagePasswordsBubbleModel::ADD_PASSWORD);
121 Refresh(); 121 Refresh();
122 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698