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

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

Issue 2127533003: Remove PasswordForm::ssl_valid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust //ios 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
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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 autofill::PasswordForm CredentialManager::GetSynthesizedFormForOrigin() const {
316 autofill::PasswordForm synthetic_form; 316 autofill::PasswordForm synthetic_form;
317 synthetic_form.origin = web_state()->GetLastCommittedURL().GetOrigin(); 317 synthetic_form.origin = web_state()->GetLastCommittedURL().GetOrigin();
318 synthetic_form.signon_realm = synthetic_form.origin.spec(); 318 synthetic_form.signon_realm = synthetic_form.origin.spec();
319 synthetic_form.scheme = autofill::PasswordForm::SCHEME_HTML; 319 synthetic_form.scheme = autofill::PasswordForm::SCHEME_HTML;
320 synthetic_form.ssl_valid = synthetic_form.origin.SchemeIsCryptographic() &&
321 !client_->DidLastPageLoadEncounterSSLErrors();
322 return synthetic_form; 320 return synthetic_form;
323 } 321 }
324 322
325 void CredentialManager::OnProvisionalSaveComplete() { 323 void CredentialManager::OnProvisionalSaveComplete() {
326 // Invoked after a credential sent up by the page was stored in a FormManager 324 // Invoked after a credential sent up by the page was stored in a FormManager
327 // by |SignedIn|, this function asks the user if the password should be stored 325 // by |SignedIn|, this function asks the user if the password should be stored
328 // in the password manager. 326 // in the password manager.
329 DCHECK(form_manager_); 327 DCHECK(form_manager_);
330 if (client_->IsSavingAndFillingEnabledForCurrentPage() && 328 if (client_->IsSavingAndFillingEnabledForCurrentPage() &&
331 !form_manager_->IsBlacklisted()) { 329 !form_manager_->IsBlacklisted()) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 bool CredentialManager::GetUrlWithAbsoluteTrust(GURL* page_url) { 377 bool CredentialManager::GetUrlWithAbsoluteTrust(GURL* page_url) {
380 web::URLVerificationTrustLevel trust_level = 378 web::URLVerificationTrustLevel trust_level =
381 web::URLVerificationTrustLevel::kNone; 379 web::URLVerificationTrustLevel::kNone;
382 const GURL possibly_untrusted_url(web_state()->GetCurrentURL(&trust_level)); 380 const GURL possibly_untrusted_url(web_state()->GetCurrentURL(&trust_level));
383 if (trust_level == web::URLVerificationTrustLevel::kAbsolute) { 381 if (trust_level == web::URLVerificationTrustLevel::kAbsolute) {
384 *page_url = possibly_untrusted_url; 382 *page_url = possibly_untrusted_url;
385 return true; 383 return true;
386 } 384 }
387 return false; 385 return false;
388 } 386 }
OLDNEW
« no previous file with comments | « components/test/data/password_manager/login_db_v18.sql ('k') | ios/chrome/browser/passwords/credential_manager_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698