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

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

Issue 383083009: [Password Manager] Fix crash in reporting sync stats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 years, 5 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 | Annotate | Revision Log
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/passwords/password_manager_presenter.h" 5 #include "chrome/browser/ui/passwords/password_manager_presenter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/user_metrics_action.h" 9 #include "base/metrics/user_metrics_action.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return; 122 return;
123 } 123 }
124 if (IsAuthenticationRequired()) { 124 if (IsAuthenticationRequired()) {
125 if (password_manager_util::AuthenticateUser( 125 if (password_manager_util::AuthenticateUser(
126 password_view_->GetNativeWindow())) 126 password_view_->GetNativeWindow()))
127 last_authentication_time_ = base::TimeTicks::Now(); 127 last_authentication_time_ = base::TimeTicks::Now();
128 else 128 else
129 return; 129 return;
130 } 130 }
131 131
132 if (password_manager_sync_metrics::IsPasswordSyncAccountCredential( 132 if (password_manager_sync_metrics::IsSyncAccountCredential(
133 password_view_->GetProfile(), 133 password_view_->GetProfile(),
134 base::UTF16ToUTF8(password_list_[index]->username_value), 134 base::UTF16ToUTF8(password_list_[index]->username_value),
135 password_list_[index]->signon_realm)) { 135 password_list_[index]->signon_realm)) {
136 content::RecordAction( 136 content::RecordAction(
137 base::UserMetricsAction("PasswordManager_SyncCredentialShown")); 137 base::UserMetricsAction("PasswordManager_SyncCredentialShown"));
138 } 138 }
139 139
140 // Call back the front end to reveal the password. 140 // Call back the front end to reveal the password.
141 password_view_->ShowPassword(index, password_list_[index]->password_value); 141 password_view_->ShowPassword(index, password_list_[index]->password_value);
142 #endif 142 #endif
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 232 }
233 233
234 void PasswordManagerPresenter::PasswordExceptionListPopulater:: 234 void PasswordManagerPresenter::PasswordExceptionListPopulater::
235 OnGetPasswordStoreResults( 235 OnGetPasswordStoreResults(
236 const std::vector<autofill::PasswordForm*>& results) { 236 const std::vector<autofill::PasswordForm*>& results) {
237 page_->password_exception_list_.clear(); 237 page_->password_exception_list_.clear();
238 page_->password_exception_list_.insert(page_->password_exception_list_.end(), 238 page_->password_exception_list_.insert(page_->password_exception_list_.end(),
239 results.begin(), results.end()); 239 results.begin(), results.end());
240 page_->SetPasswordExceptionList(); 240 page_->SetPasswordExceptionList();
241 } 241 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/sync_metrics.cc ('k') | components/password_manager/core/browser/password_form_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698