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

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

Issue 7969023: For the SSL cert status, convert anonymous enum that gives bit values into a typedefed uint32. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_SSL_SSL_MANAGER_H_
6 #define CONTENT_BROWSER_SSL_SSL_MANAGER_H_ 6 #define CONTENT_BROWSER_SSL_SSL_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "content/browser/ssl/ssl_policy_backend.h" 13 #include "content/browser/ssl/ssl_policy_backend.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/common/notification_observer.h" 15 #include "content/common/notification_observer.h"
16 #include "content/common/notification_registrar.h" 16 #include "content/common/notification_registrar.h"
17 #include "googleurl/src/gurl.h" 17 #include "googleurl/src/gurl.h"
18 #include "net/base/cert_status_flags.h"
18 #include "net/base/net_errors.h" 19 #include "net/base/net_errors.h"
19 20
20 class LoadFromMemoryCacheDetails; 21 class LoadFromMemoryCacheDetails;
21 class NavigationController; 22 class NavigationController;
22 class NavigationEntry; 23 class NavigationEntry;
23 class ProvisionalLoadDetails; 24 class ProvisionalLoadDetails;
24 class ResourceDispatcherHost; 25 class ResourceDispatcherHost;
25 class ResourceRedirectDetails; 26 class ResourceRedirectDetails;
26 class ResourceRequestDetails; 27 class ResourceRequestDetails;
27 class SSLPolicy; 28 class SSLPolicy;
(...skipping 22 matching lines...) Expand all
50 net::URLRequest* request, 51 net::URLRequest* request,
51 int cert_error, 52 int cert_error,
52 net::X509Certificate* cert); 53 net::X509Certificate* cert);
53 54
54 // Called when SSL state for a host or tab changes. Broadcasts the 55 // Called when SSL state for a host or tab changes. Broadcasts the
55 // SSL_INTERNAL_STATE_CHANGED notification. 56 // SSL_INTERNAL_STATE_CHANGED notification.
56 static void NotifySSLInternalStateChanged(NavigationController* controller); 57 static void NotifySSLInternalStateChanged(NavigationController* controller);
57 58
58 // Convenience methods for serializing/deserializing the security info. 59 // Convenience methods for serializing/deserializing the security info.
59 static std::string SerializeSecurityInfo(int cert_id, 60 static std::string SerializeSecurityInfo(int cert_id,
60 int cert_status, 61 net::CertStatus cert_status,
61 int security_bits, 62 int security_bits,
62 int connection_status); 63 int connection_status);
63 CONTENT_EXPORT static bool DeserializeSecurityInfo(const std::string& state, 64 CONTENT_EXPORT static bool DeserializeSecurityInfo(
64 int* cert_id, 65 const std::string& state,
65 int* cert_status, 66 int* cert_id,
66 int* security_bits, 67 net::CertStatus* cert_status,
67 int* connection_status); 68 int* security_bits,
69 int* connection_status);
68 70
69 // Construct an SSLManager for the specified tab. 71 // Construct an SSLManager for the specified tab.
70 // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used. 72 // If |delegate| is NULL, SSLPolicy::GetDefaultPolicy() is used.
71 explicit SSLManager(NavigationController* controller); 73 explicit SSLManager(NavigationController* controller);
72 virtual ~SSLManager(); 74 virtual ~SSLManager();
73 75
74 SSLPolicy* policy() { return policy_.get(); } 76 SSLPolicy* policy() { return policy_.get(); }
75 SSLPolicyBackend* backend() { return &backend_; } 77 SSLPolicyBackend* backend() { return &backend_; }
76 78
77 // The navigation controller associated with this SSLManager. The 79 // The navigation controller associated with this SSLManager. The
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // for the security UI of this tab. 122 // for the security UI of this tab.
121 NavigationController* controller_; 123 NavigationController* controller_;
122 124
123 // Handles registering notifications with the NotificationService. 125 // Handles registering notifications with the NotificationService.
124 NotificationRegistrar registrar_; 126 NotificationRegistrar registrar_;
125 127
126 DISALLOW_COPY_AND_ASSIGN(SSLManager); 128 DISALLOW_COPY_AND_ASSIGN(SSLManager);
127 }; 129 };
128 130
129 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_ 131 #endif // CONTENT_BROWSER_SSL_SSL_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_request_details.h ('k') | content/browser/ssl/ssl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698