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

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

Issue 2296953004: Send certificates to devtools when it's open instead of using certId (Closed)
Patch Set: clear certificates on didstartprovisionalload Created 4 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
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/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/browser/certificate_request_result_type.h" 13 #include "content/public/browser/certificate_request_result_type.h"
14 #include "content/public/common/resource_type.h" 14 #include "content/public/common/resource_type.h"
15 #include "content/public/common/security_style.h"
16 #include "net/cert/cert_status_flags.h" 15 #include "net/cert/cert_status_flags.h"
17 16
18 class GURL; 17 class GURL;
19 18
20 namespace content { 19 namespace content {
21 class NavigationEntryImpl; 20 class NavigationEntryImpl;
22 class SSLErrorHandler; 21 class SSLErrorHandler;
23 class SSLPolicyBackend; 22 class SSLPolicyBackend;
24 class WebContents; 23 class WebContents;
25 24
(...skipping 21 matching lines...) Expand all
47 void OnRequestStarted(const GURL& url, 46 void OnRequestStarted(const GURL& url,
48 int cert_id, 47 int cert_id,
49 net::CertStatus cert_status); 48 net::CertStatus cert_status);
50 49
51 // Update the SSL information in |entry| to match the current state. 50 // Update the SSL information in |entry| to match the current state.
52 // |web_contents| is the WebContents associated with this entry. 51 // |web_contents| is the WebContents associated with this entry.
53 void UpdateEntry(NavigationEntryImpl* entry, WebContents* web_contents); 52 void UpdateEntry(NavigationEntryImpl* entry, WebContents* web_contents);
54 53
55 SSLPolicyBackend* backend() const { return backend_; } 54 SSLPolicyBackend* backend() const { return backend_; }
56 55
57 // Returns a security style describing an individual resource. Does
58 // not take into account any of the page- or host-level state such as
59 // mixed content or whether the host has run insecure content.
60 static SecurityStyle GetSecurityStyleForResource(const GURL& url,
61 int cert_id,
62 net::CertStatus cert_status);
63
64 private: 56 private:
65 enum OnCertErrorInternalOptionsMask { 57 enum OnCertErrorInternalOptionsMask {
66 OVERRIDABLE = 1 << 0, 58 OVERRIDABLE = 1 << 0,
67 STRICT_ENFORCEMENT = 1 << 1, 59 STRICT_ENFORCEMENT = 1 << 1,
68 EXPIRED_PREVIOUS_DECISION = 1 << 2 60 EXPIRED_PREVIOUS_DECISION = 1 << 2
69 }; 61 };
70 62
71 // Helper method for derived classes handling certificate errors. 63 // Helper method for derived classes handling certificate errors.
72 // 64 //
73 // Options should be a bitmask combination of OnCertErrorInternalOptionsMask. 65 // Options should be a bitmask combination of OnCertErrorInternalOptionsMask.
(...skipping 13 matching lines...) Expand all
87 79
88 // The backend we use to enact our decisions. 80 // The backend we use to enact our decisions.
89 SSLPolicyBackend* backend_; 81 SSLPolicyBackend* backend_;
90 82
91 DISALLOW_COPY_AND_ASSIGN(SSLPolicy); 83 DISALLOW_COPY_AND_ASSIGN(SSLPolicy);
92 }; 84 };
93 85
94 } // namespace content 86 } // namespace content
95 87
96 #endif // CONTENT_BROWSER_SSL_SSL_POLICY_H_ 88 #endif // CONTENT_BROWSER_SSL_SSL_POLICY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698