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

Side by Side Diff: ios/chrome/browser/passwords/credential_manager.mm

Issue 2133953002: PasswordForm -> FormDigest for GetLogins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@413020_ssl_valid
Patch Set: Nits addressed Created 4 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
« no previous file with comments | « ios/chrome/browser/passwords/credential_manager.h ('k') | 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 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 #import "ios/chrome/browser/passwords/credential_manager.h" 5 #import "ios/chrome/browser/passwords/credential_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/ios/ios_util.h" 9 #include "base/ios/ios_util.h"
10 #import "base/ios/weak_nsobject.h" 10 #import "base/ios/weak_nsobject.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 info = password_manager::CredentialInfo(*form, type_to_return); 305 info = password_manager::CredentialInfo(*form, type_to_return);
306 // TODO(vasilii): update |skip_zero_click| in the store (crbug.com/594110). 306 // TODO(vasilii): update |skip_zero_click| in the store (crbug.com/594110).
307 } 307 }
308 SendCredential(send_callback, info); 308 SendCredential(send_callback, info);
309 } 309 }
310 310
311 password_manager::PasswordManagerClient* CredentialManager::client() const { 311 password_manager::PasswordManagerClient* CredentialManager::client() const {
312 return client_; 312 return client_;
313 } 313 }
314 314
315 autofill::PasswordForm CredentialManager::GetSynthesizedFormForOrigin() const { 315 password_manager::PasswordStore::FormDigest
316 autofill::PasswordForm synthetic_form; 316 CredentialManager::GetSynthesizedFormForOrigin() const {
317 synthetic_form.origin = web_state()->GetLastCommittedURL().GetOrigin(); 317 password_manager::PasswordStore::FormDigest form = {
318 synthetic_form.signon_realm = synthetic_form.origin.spec(); 318 autofill::PasswordForm::SCHEME_HTML, std::string(),
319 synthetic_form.scheme = autofill::PasswordForm::SCHEME_HTML; 319 web_state()->GetLastCommittedURL().GetOrigin()};
320 return synthetic_form; 320 form.signon_realm = form.origin.spec();
321 return form;
321 } 322 }
322 323
323 void CredentialManager::OnProvisionalSaveComplete() { 324 void CredentialManager::OnProvisionalSaveComplete() {
324 // Invoked after a credential sent up by the page was stored in a FormManager 325 // Invoked after a credential sent up by the page was stored in a FormManager
325 // by |SignedIn|, this function asks the user if the password should be stored 326 // by |SignedIn|, this function asks the user if the password should be stored
326 // in the password manager. 327 // in the password manager.
327 DCHECK(form_manager_); 328 DCHECK(form_manager_);
328 if (client_->IsSavingAndFillingEnabledForCurrentPage() && 329 if (client_->IsSavingAndFillingEnabledForCurrentPage() &&
329 !form_manager_->IsBlacklisted()) { 330 !form_manager_->IsBlacklisted()) {
330 client_->PromptUserToSaveOrUpdatePassword( 331 client_->PromptUserToSaveOrUpdatePassword(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 bool CredentialManager::GetUrlWithAbsoluteTrust(GURL* page_url) { 378 bool CredentialManager::GetUrlWithAbsoluteTrust(GURL* page_url) {
378 web::URLVerificationTrustLevel trust_level = 379 web::URLVerificationTrustLevel trust_level =
379 web::URLVerificationTrustLevel::kNone; 380 web::URLVerificationTrustLevel::kNone;
380 const GURL possibly_untrusted_url(web_state()->GetCurrentURL(&trust_level)); 381 const GURL possibly_untrusted_url(web_state()->GetCurrentURL(&trust_level));
381 if (trust_level == web::URLVerificationTrustLevel::kAbsolute) { 382 if (trust_level == web::URLVerificationTrustLevel::kAbsolute) {
382 *page_url = possibly_untrusted_url; 383 *page_url = possibly_untrusted_url;
383 return true; 384 return true;
384 } 385 }
385 return false; 386 return false;
386 } 387 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/passwords/credential_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698