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

Side by Side Diff: content/browser/ssl/ssl_policy.cc

Issue 20986004: Notify about reset of the "displayed insecure content" state flag (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 4 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 | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/ssl/ssl_policy.h" 5 #include "content/browser/ssl/ssl_policy.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 backend_->DidHostRunInsecureContent( 131 backend_->DidHostRunInsecureContent(
132 entry->GetURL().host(), site_instance->GetProcess()->GetID())) { 132 entry->GetURL().host(), site_instance->GetProcess()->GetID())) {
133 entry->GetSSL().security_style = 133 entry->GetSSL().security_style =
134 SECURITY_STYLE_AUTHENTICATION_BROKEN; 134 SECURITY_STYLE_AUTHENTICATION_BROKEN;
135 entry->GetSSL().content_status |= SSLStatus::RAN_INSECURE_CONTENT; 135 entry->GetSSL().content_status |= SSLStatus::RAN_INSECURE_CONTENT;
136 return; 136 return;
137 } 137 }
138 138
139 if (web_contents->DisplayedInsecureContent()) 139 if (web_contents->DisplayedInsecureContent())
140 entry->GetSSL().content_status |= SSLStatus::DISPLAYED_INSECURE_CONTENT; 140 entry->GetSSL().content_status |= SSLStatus::DISPLAYED_INSECURE_CONTENT;
141 else
142 entry->GetSSL().content_status &= ~SSLStatus::DISPLAYED_INSECURE_CONTENT;
141 } 143 }
142 144
143 void SSLPolicy::OnAllowCertificate(scoped_refptr<SSLCertErrorHandler> handler, 145 void SSLPolicy::OnAllowCertificate(scoped_refptr<SSLCertErrorHandler> handler,
144 bool allow) { 146 bool allow) {
145 if (allow) { 147 if (allow) {
146 // Default behavior for accepting a certificate. 148 // Default behavior for accepting a certificate.
147 // Note that we should not call SetMaxSecurityStyle here, because the active 149 // Note that we should not call SetMaxSecurityStyle here, because the active
148 // NavigationEntry has just been deleted (in HideInterstitialPage) and the 150 // NavigationEntry has just been deleted (in HideInterstitialPage) and the
149 // new NavigationEntry will not be set until DidNavigate. This is ok, 151 // new NavigationEntry will not be set until DidNavigate. This is ok,
150 // because the new NavigationEntry will have its max security style set 152 // because the new NavigationEntry will have its max security style set
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED; 212 SECURITY_STYLE_AUTHENTICATED : SECURITY_STYLE_UNAUTHENTICATED;
211 } 213 }
212 214
213 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) { 215 void SSLPolicy::OriginRanInsecureContent(const std::string& origin, int pid) {
214 GURL parsed_origin(origin); 216 GURL parsed_origin(origin);
215 if (parsed_origin.SchemeIsSecure()) 217 if (parsed_origin.SchemeIsSecure())
216 backend_->HostRanInsecureContent(parsed_origin.host(), pid); 218 backend_->HostRanInsecureContent(parsed_origin.host(), pid);
217 } 219 }
218 220
219 } // namespace content 221 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698