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

Side by Side Diff: chrome/browser/ui/autofill/chrome_autofill_client.cc

Issue 2400673003: Remove SSLStatus::security_style member and content::SecurityStyle (Closed)
Patch Set: more curly braces Created 4 years, 2 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 | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/autofill/chrome_autofill_client.h" 5 #include "chrome/browser/ui/autofill/chrome_autofill_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { 351 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) {
352 content::SSLStatus ssl_status; 352 content::SSLStatus ssl_status;
353 content::NavigationEntry* navigation_entry = 353 content::NavigationEntry* navigation_entry =
354 web_contents()->GetController().GetLastCommittedEntry(); 354 web_contents()->GetController().GetLastCommittedEntry();
355 if (!navigation_entry) 355 if (!navigation_entry)
356 return false; 356 return false;
357 357
358 ssl_status = navigation_entry->GetSSL(); 358 ssl_status = navigation_entry->GetSSL();
359 // Note: If changing the implementation below, also change 359 // Note: If changing the implementation below, also change
360 // AwAutofillClient::IsContextSecure. See crbug.com/505388 360 // AwAutofillClient::IsContextSecure. See crbug.com/505388
361 return ssl_status.security_style == content::SECURITY_STYLE_AUTHENTICATED && 361 return navigation_entry->GetURL().SchemeIsCryptographic() &&
362 ssl_status.certificate &&
363 (!net::IsCertStatusError(ssl_status.cert_status) ||
364 net::IsCertStatusMinorError(ssl_status.cert_status)) &&
362 !(ssl_status.content_status & 365 !(ssl_status.content_status &
363 content::SSLStatus::RAN_INSECURE_CONTENT); 366 content::SSLStatus::RAN_INSECURE_CONTENT);
364 } 367 }
365 368
366 bool ChromeAutofillClient::ShouldShowSigninPromo() { 369 bool ChromeAutofillClient::ShouldShowSigninPromo() {
367 #if !defined(OS_ANDROID) 370 #if !defined(OS_ANDROID)
368 // Determine if we are in a valid context (on desktop platforms, we could be 371 // Determine if we are in a valid context (on desktop platforms, we could be
369 // in an app window with no Browser). 372 // in an app window with no Browser).
370 if (!chrome::FindBrowserWithWebContents(web_contents())) 373 if (!chrome::FindBrowserWithWebContents(web_contents()))
371 return false; 374 return false;
(...skipping 12 matching lines...) Expand all
384 chrome::FindBrowserWithWebContents(web_contents()) 387 chrome::FindBrowserWithWebContents(web_contents())
385 ->window() 388 ->window()
386 ->ShowAvatarBubbleFromAvatarButton( 389 ->ShowAvatarBubbleFromAvatarButton(
387 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, 390 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN,
388 signin::ManageAccountsParams(), 391 signin::ManageAccountsParams(),
389 signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN); 392 signin_metrics::AccessPoint::ACCESS_POINT_AUTOFILL_DROPDOWN);
390 #endif 393 #endif
391 } 394 }
392 395
393 } // namespace autofill 396 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698