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

Unified Diff: content/public/browser/ssl_host_state.h

Issue 418133012: Add button to page info to revoke user certificate decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address pkasting comments Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/ssl_host_state.h
diff --git a/content/public/browser/ssl_host_state.h b/content/public/browser/ssl_host_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..9367e5ea3b7da313da40d7111c5f2b6edd8d28a7
--- /dev/null
+++ b/content/public/browser/ssl_host_state.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_SSL_SSL_HOST_STATE_H_
+#define CONTENT_PUBLIC_BROWSER_SSL_SSL_HOST_STATE_H_
+
+#include <map>
+#include <set>
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/supports_user_data.h"
+#include "base/threading/non_thread_safe.h"
+#include "content/common/content_export.h"
+#include "net/cert/cert_status_flags.h"
+#include "net/cert/x509_certificate.h"
+
+namespace content {
+class BrowserContext;
+class SSLHostStateDelegate;
+
+// SSLHostState
+//
+// The SSLHostState encapulates the host-specific state for SSL errors. For
+// example, SSLHostState remembers whether the user has whitelisted a
+// particular broken cert for use with particular host. We separate this state
+// from the SSLManager because this state is shared across many navigation
+// controllers.
+class CONTENT_EXPORT SSLHostState
+ : NON_EXPORTED_BASE(public base::NonThreadSafe) {
jam 2014/08/06 21:27:26 nit: get rid of the NonThreadSafe, if you really w
jww 2014/08/11 19:21:28 Removed ssl_host_state.{h,cc} completely, as per o
+ public:
+ SSLHostState(BrowserContext*);
+ virtual ~SSLHostState() {}
+
+ // Revoke all allow/deny preferences for a given host. The
+ // RevokeAllowAndDenyPreferencesHard version may close idle connections in the
+ // process. This version should be used *only* for rare events, such as a user
+ // controlled button, as it may be very disruptive to the networking stack.
+ virtual void RevokeAllowAndDenyPreferences(const std::string& host);
+ virtual void RevokeAllowAndDenyPreferencesHard(const std::string& host);
+
+ virtual bool HasAllowedOrDeniedCert(const std::string& host);
jam 2014/08/06 21:27:26 nit: document
jww 2014/08/11 19:21:28 Removed ssl_host_state.{h,cc} completely, as per o
+
+ void set_delegate(SSLHostStateDelegate* delegate) { delegate_ = delegate; }
jam 2014/08/06 21:27:26 this would be a pure method called SetDelegate
jww 2014/08/11 19:21:28 Removed ssl_host_state.{h,cc} completely, as per o
+
+ protected:
+ // BrowserContext that the state was created on.
+ BrowserContext* browser_context_;
+
+ // The certificate decision store. It may be NULL, depending on the browsing
+ // context. This is owned by the browsing context.
+ SSLHostStateDelegate* delegate_;
jam 2014/08/06 21:27:26 nit: see http://www.chromium.org/developers/conten
jww 2014/08/11 19:21:28 Removed ssl_host_state.{h,cc} completely, as per o
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_SSL_SSL_HOST_STATE_H_

Powered by Google App Engine
This is Rietveld 408576698