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

Unified Diff: chrome/browser/ssl/ssl_manager.h

Issue 20296: Remember that we've white listed a certificate when we switch to a new tab.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ssl/ssl_manager.h
===================================================================
--- chrome/browser/ssl/ssl_manager.h (revision 9212)
+++ chrome/browser/ssl/ssl_manager.h (working copy)
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SSL_MANAGER_H_
-#define CHROME_BROWSER_SSL_MANAGER_H_
+#ifndef CHROME_BROWSER_SSL_SSL_MANAGER_H_
+#define CHROME_BROWSER_SSL_SSL_MANAGER_H_
#include <string>
#include <map>
+#include <vector>
#include "base/basictypes.h"
#include "base/observer_list.h"
@@ -32,6 +33,7 @@
class ResourceRedirectDetails;
class ResourceRequestDetails;
class SSLErrorInfo;
+class SSLHostState;
class Task;
class URLRequest;
class WebContents;
@@ -71,7 +73,7 @@
const GURL& request_url() const { return request_url_; }
// Call on the UI thread.
- SSLManager* manager() const { return manager_; };
+ SSLManager* manager() const { return manager_; }
// Returns the WebContents this object is associated with. Should be
// called from the UI thread.
@@ -162,8 +164,8 @@
const GURL request_url_; // The URL that we requested.
// Should only be accessed on the IO thread
- bool request_has_been_notified_; // A flag to make sure we notify the
- // URLRequest exactly once.
+ bool request_has_been_notified_; // A flag to make sure we notify the
+ // URLRequest exactly once.
DISALLOW_EVIL_CONSTRUCTORS(ErrorHandler);
};
@@ -198,7 +200,7 @@
// These read-only members can be accessed on any thread.
net::SSLInfo ssl_info_;
- const int cert_error_; // The error we represent.
+ const int cert_error_; // The error we represent.
// What kind of resource is associated with the requested that generated
// that error.
@@ -337,7 +339,7 @@
// Called when a mixed-content sub-resource request has been detected. The
// request is not started yet. The SSLManager will make a decision on whether
// to filter that request's content (with the filter_policy flag).
- // TODO (jcampan): Implement a way to just cancel the request. This is not
+ // TODO(jcampan): Implement a way to just cancel the request. This is not
// straight-forward as canceling a request that has not been started will
// not remove from the pending_requests_ of the ResourceDispatcherHost.
// Called on the IO thread.
@@ -398,24 +400,24 @@
// in an info-bar.
struct SSLMessageInfo {
public:
- explicit SSLMessageInfo(const std::wstring& text)
- : message(text),
- action(NULL) { }
- SSLMessageInfo(const std::wstring& message,
- const std::wstring& link_text,
- Task* action)
- : message(message), link_text(link_text), action(action) { }
+ explicit SSLMessageInfo(const std::wstring& text)
+ : message(text),
wtc 2009/02/12 21:41:46 Nit: this colon should be indented 4 spaces. See
+ action(NULL) { }
+ SSLMessageInfo(const std::wstring& message,
+ const std::wstring& link_text,
+ Task* action)
+ : message(message), link_text(link_text), action(action) { }
- // Overridden so that std::find works.
- bool operator==(const std::wstring& other_message) const {
- // We are uniquing SSLMessageInfo by their message only.
- return message == other_message;
- }
+ // Overridden so that std::find works.
+ bool operator==(const std::wstring& other_message) const {
+ // We are uniquing SSLMessageInfo by their message only.
+ return message == other_message;
+ }
- std::wstring message;
- std::wstring link_text;
- Task* action;
- };
+ std::wstring message;
+ std::wstring link_text;
+ Task* action;
+ };
// Entry points for notifications to which we subscribe. Note that
// DidCommitProvisionalLoad uses the abstract NotificationDetails type since
@@ -447,12 +449,9 @@
// Handles registering notifications with the NotificationService.
NotificationRegistrar registrar_;
- // Certificate policies for each host.
- std::map<std::string, net::X509Certificate::Policy> cert_policy_for_host_;
+ // SSL state specific for each host.
+ SSLHostState* ssl_host_state_;
- // Domains for which it is OK to show insecure content.
- std::set<std::string> can_show_insecure_content_for_host_;
-
// The list of messages that should be displayed (in info bars) when the page
// currently loading had loaded.
std::vector<SSLMessageInfo> pending_messages_;
@@ -460,5 +459,4 @@
DISALLOW_COPY_AND_ASSIGN(SSLManager);
};
-#endif // CHROME_BROWSER_SSL_MANAGER_H_
-
+#endif // CHROME_BROWSER_SSL_SSL_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698