| OLD | NEW |
| 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 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 5 #include "chrome/browser/ssl/chrome_security_state_model_client.h" |
| 6 | 6 |
| 7 #include <openssl/ssl.h> | 7 #include <openssl/ssl.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 return; | 355 return; |
| 356 } | 356 } |
| 357 | 357 |
| 358 logged_http_warning_on_current_navigation_ = true; | 358 logged_http_warning_on_current_navigation_ = true; |
| 359 web_contents_->GetMainFrame()->AddMessageToConsole( | 359 web_contents_->GetMainFrame()->AddMessageToConsole( |
| 360 content::CONSOLE_MESSAGE_LEVEL_WARNING, warning); | 360 content::CONSOLE_MESSAGE_LEVEL_WARNING, warning); |
| 361 } | 361 } |
| 362 | 362 |
| 363 void ChromeSecurityStateModelClient::DidFinishNavigation( | 363 void ChromeSecurityStateModelClient::DidFinishNavigation( |
| 364 content::NavigationHandle* navigation_handle) { | 364 content::NavigationHandle* navigation_handle) { |
| 365 if (navigation_handle->IsInMainFrame() && | 365 if (navigation_handle->IsInMainFrame() && !navigation_handle->IsSamePage()) { |
| 366 !navigation_handle->IsSynchronousNavigation()) { | |
| 367 // Only reset the console message flag for main-frame navigations, | 366 // Only reset the console message flag for main-frame navigations, |
| 368 // and not for synchronous navigations like reference fragments and | 367 // and not for same-page navigations like reference fragments and pushState. |
| 369 // pushState. | |
| 370 logged_http_warning_on_current_navigation_ = false; | 368 logged_http_warning_on_current_navigation_ = false; |
| 371 } | 369 } |
| 372 } | 370 } |
| 373 | 371 |
| 374 bool ChromeSecurityStateModelClient::UsedPolicyInstalledCertificate() { | 372 bool ChromeSecurityStateModelClient::UsedPolicyInstalledCertificate() { |
| 375 #if defined(OS_CHROMEOS) | 373 #if defined(OS_CHROMEOS) |
| 376 policy::PolicyCertService* service = | 374 policy::PolicyCertService* service = |
| 377 policy::PolicyCertServiceFactory::GetForProfile( | 375 policy::PolicyCertServiceFactory::GetForProfile( |
| 378 Profile::FromBrowserContext(web_contents_->GetBrowserContext())); | 376 Profile::FromBrowserContext(web_contents_->GetBrowserContext())); |
| 379 if (service && service->UsedPolicyCertificates()) | 377 if (service && service->UsedPolicyCertificates()) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); | 425 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); |
| 428 state->displayed_password_field_on_http = | 426 state->displayed_password_field_on_http = |
| 429 !!(ssl.content_status & | 427 !!(ssl.content_status & |
| 430 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); | 428 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); |
| 431 state->displayed_credit_card_field_on_http = | 429 state->displayed_credit_card_field_on_http = |
| 432 !!(ssl.content_status & | 430 !!(ssl.content_status & |
| 433 content::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP); | 431 content::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP); |
| 434 | 432 |
| 435 CheckSafeBrowsingStatus(entry, web_contents_, state); | 433 CheckSafeBrowsingStatus(entry, web_contents_, state); |
| 436 } | 434 } |
| OLD | NEW |