OLD | NEW |
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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { | 377 bool ChromeAutofillClient::IsContextSecure(const GURL& form_origin) { |
378 content::SSLStatus ssl_status; | 378 content::SSLStatus ssl_status; |
379 content::NavigationEntry* navigation_entry = | 379 content::NavigationEntry* navigation_entry = |
380 web_contents()->GetController().GetLastCommittedEntry(); | 380 web_contents()->GetController().GetLastCommittedEntry(); |
381 if (!navigation_entry) | 381 if (!navigation_entry) |
382 return false; | 382 return false; |
383 | 383 |
384 ssl_status = navigation_entry->GetSSL(); | 384 ssl_status = navigation_entry->GetSSL(); |
385 // Note: If changing the implementation below, also change | 385 // Note: If changing the implementation below, also change |
386 // AwAutofillClient::IsContextSecure. See crbug.com/505388 | 386 // AwAutofillClient::IsContextSecure. See crbug.com/505388 |
387 return ssl_status.security_style == | 387 return ssl_status.security_style == content::SECURITY_STYLE_AUTHENTICATED && |
388 content::SECURITY_STYLE_AUTHENTICATED && | 388 !(ssl_status.content_status & |
389 ssl_status.content_status == content::SSLStatus::NORMAL_CONTENT; | 389 content::SSLStatus::RAN_INSECURE_CONTENT); |
390 } | 390 } |
391 | 391 |
392 } // namespace autofill | 392 } // namespace autofill |
OLD | NEW |