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

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

Issue 1332633002: Add constructor to create SSLStatus from SSLInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: meacer comment Created 5 years, 3 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 | « content/browser/loader/resource_loader.cc ('k') | content/browser/ssl/ssl_policy.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 #ifndef CONTENT_BROWSER_SSL_SSL_POLICY_H_ 5 #ifndef CONTENT_BROWSER_SSL_SSL_POLICY_H_
6 #define CONTENT_BROWSER_SSL_SSL_POLICY_H_ 6 #define CONTENT_BROWSER_SSL_SSL_POLICY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "content/public/common/resource_type.h" 11 #include "content/public/common/resource_type.h"
12 #include "content/public/common/security_style.h" 12 #include "content/public/common/security_style.h"
13 #include "net/cert/cert_status_flags.h"
13 14
14 class GURL; 15 class GURL;
15 16
16 namespace content { 17 namespace content {
17 class NavigationEntryImpl; 18 class NavigationEntryImpl;
18 class SSLCertErrorHandler; 19 class SSLCertErrorHandler;
19 class SSLPolicyBackend; 20 class SSLPolicyBackend;
20 class SSLRequestInfo; 21 class SSLRequestInfo;
21 class WebContents; 22 class WebContents;
22 struct SSLStatus; 23 struct SSLStatus;
(...skipping 20 matching lines...) Expand all
43 // Update the SSL information in |entry| to match the current state. 44 // Update the SSL information in |entry| to match the current state.
44 // |web_contents| is the WebContents associated with this entry. 45 // |web_contents| is the WebContents associated with this entry.
45 void UpdateEntry(NavigationEntryImpl* entry, WebContents* web_contents); 46 void UpdateEntry(NavigationEntryImpl* entry, WebContents* web_contents);
46 47
47 SSLPolicyBackend* backend() const { return backend_; } 48 SSLPolicyBackend* backend() const { return backend_; }
48 49
49 // Returns a security style describing an individual resource. Does 50 // Returns a security style describing an individual resource. Does
50 // not take into account any of the page- or host-level state such as 51 // not take into account any of the page- or host-level state such as
51 // mixed content or whether the host has run insecure content. 52 // mixed content or whether the host has run insecure content.
52 static SecurityStyle GetSecurityStyleForResource(const GURL& url, 53 static SecurityStyle GetSecurityStyleForResource(const GURL& url,
53 const SSLStatus& ssl); 54 int cert_id,
55 net::CertStatus cert_status);
54 56
55 private: 57 private:
56 enum OnCertErrorInternalOptionsMask { 58 enum OnCertErrorInternalOptionsMask {
57 OVERRIDABLE = 1 << 0, 59 OVERRIDABLE = 1 << 0,
58 STRICT_ENFORCEMENT = 1 << 1, 60 STRICT_ENFORCEMENT = 1 << 1,
59 EXPIRED_PREVIOUS_DECISION = 1 << 2 61 EXPIRED_PREVIOUS_DECISION = 1 << 2
60 }; 62 };
61 63
62 // Callback that the user chose to accept or deny the certificate. 64 // Callback that the user chose to accept or deny the certificate.
63 void OnAllowCertificate(scoped_refptr<SSLCertErrorHandler> handler, 65 void OnAllowCertificate(scoped_refptr<SSLCertErrorHandler> handler,
(...skipping 20 matching lines...) Expand all
84 86
85 // The backend we use to enact our decisions. 87 // The backend we use to enact our decisions.
86 SSLPolicyBackend* backend_; 88 SSLPolicyBackend* backend_;
87 89
88 DISALLOW_COPY_AND_ASSIGN(SSLPolicy); 90 DISALLOW_COPY_AND_ASSIGN(SSLPolicy);
89 }; 91 };
90 92
91 } // namespace content 93 } // namespace content
92 94
93 #endif // CONTENT_BROWSER_SSL_SSL_POLICY_H_ 95 #endif // CONTENT_BROWSER_SSL_SSL_POLICY_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/browser/ssl/ssl_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698