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

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

Issue 10916348: Switch SSLTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_client_certificate_selector.h ('k') | chrome/browser/ssl/ssl_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_tab_helper.h
diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.h b/chrome/browser/ssl/ssl_tab_helper.h
similarity index 80%
rename from chrome/browser/tab_contents/tab_contents_ssl_helper.h
rename to chrome/browser/ssl/ssl_tab_helper.h
index 2b08c5a649fbdff152c0db735bbf7913245fbdb7..dc2a81837dc206bab34467866cf7146b4ec85209 100644
--- a/chrome/browser/tab_contents/tab_contents_ssl_helper.h
+++ b/chrome/browser/ssl/ssl_tab_helper.h
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_
-#define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_
+#ifndef CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_
+#define CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_
#include <map>
#include "base/callback_forward.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
+#include "chrome/browser/tab_contents/web_contents_user_data.h"
class SSLAddCertHandler;
-class TabContents;
namespace net {
class HttpNetworkSession;
@@ -20,10 +20,9 @@ class SSLCertRequestInfo;
class X509Certificate;
}
-class TabContentsSSLHelper {
+class SSLTabHelper : public WebContentsUserData<SSLTabHelper> {
public:
- explicit TabContentsSSLHelper(TabContents* tab_contents);
- virtual ~TabContentsSSLHelper();
+ virtual ~SSLTabHelper();
// Called when |handler| encounters an error in verifying a received client
// certificate. Note that, because CAs often will not send us intermediate
@@ -59,14 +58,18 @@ class TabContentsSSLHelper {
const base::Callback<void(net::X509Certificate*)>& callback);
private:
- TabContents* tab_contents_;
+ explicit SSLTabHelper(content::WebContents* contents);
+ static int kUserDataKey;
+ friend class WebContentsUserData<SSLTabHelper>;
+
+ content::WebContents* web_contents_;
class SSLAddCertData;
std::map<int, linked_ptr<SSLAddCertData> > request_id_to_add_cert_data_;
SSLAddCertData* GetAddCertData(SSLAddCertHandler* handler);
- DISALLOW_COPY_AND_ASSIGN(TabContentsSSLHelper);
+ DISALLOW_COPY_AND_ASSIGN(SSLTabHelper);
};
-#endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_
+#endif // CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_
« no previous file with comments | « chrome/browser/ssl/ssl_client_certificate_selector.h ('k') | chrome/browser/ssl/ssl_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698