Chromium Code Reviews| 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 synchronous navigations like reference fragments and |
|
Charlie Reis
2016/10/27 20:51:24
nit: s/synchronous/same-page/
nasko
2016/10/27 21:22:34
Done.
| |
| 369 // pushState. | 368 // pushState. |
| 370 logged_http_warning_on_current_navigation_ = false; | 369 logged_http_warning_on_current_navigation_ = false; |
| 371 } | 370 } |
| 372 } | 371 } |
| 373 | 372 |
| 374 bool ChromeSecurityStateModelClient::UsedPolicyInstalledCertificate() { | 373 bool ChromeSecurityStateModelClient::UsedPolicyInstalledCertificate() { |
| 375 #if defined(OS_CHROMEOS) | 374 #if defined(OS_CHROMEOS) |
| 376 policy::PolicyCertService* service = | 375 policy::PolicyCertService* service = |
| 377 policy::PolicyCertServiceFactory::GetForProfile( | 376 policy::PolicyCertServiceFactory::GetForProfile( |
| 378 Profile::FromBrowserContext(web_contents_->GetBrowserContext())); | 377 Profile::FromBrowserContext(web_contents_->GetBrowserContext())); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 427 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); | 426 !!(ssl.content_status & content::SSLStatus::RAN_CONTENT_WITH_CERT_ERRORS); |
| 428 state->displayed_password_field_on_http = | 427 state->displayed_password_field_on_http = |
| 429 !!(ssl.content_status & | 428 !!(ssl.content_status & |
| 430 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); | 429 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); |
| 431 state->displayed_credit_card_field_on_http = | 430 state->displayed_credit_card_field_on_http = |
| 432 !!(ssl.content_status & | 431 !!(ssl.content_status & |
| 433 content::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP); | 432 content::SSLStatus::DISPLAYED_CREDIT_CARD_FIELD_ON_HTTP); |
| 434 | 433 |
| 435 CheckSafeBrowsingStatus(entry, web_contents_, state); | 434 CheckSafeBrowsingStatus(entry, web_contents_, state); |
| 436 } | 435 } |
| OLD | NEW |