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

Unified Diff: content/browser/ssl/ssl_error_handler.h

Issue 1459473003: Add a WebContents getter callback in ResourceRequestInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed davidben's comments Created 5 years, 1 month 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/browser/ssl/ssl_error_handler.h
diff --git a/content/browser/ssl/ssl_error_handler.h b/content/browser/ssl/ssl_error_handler.h
index 26fc147c3f4e8d465661b152d4674dfef0d4f39b..240133456fdadc275e8f4d5c496c8982584da534 100644
--- a/content/browser/ssl/ssl_error_handler.h
+++ b/content/browser/ssl/ssl_error_handler.h
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "content/common/content_export.h"
#include "content/public/browser/global_request_id.h"
+#include "content/public/browser/resource_request_info.h"
#include "content/public/common/resource_type.h"
#include "url/gurl.h"
@@ -65,7 +66,7 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> {
// this error.
//
// Call on UI thread.
- void Dispatch();
+ void Dispatch(const base::Callback<WebContents*(void)>& web_contents_getter);
// Available on either thread.
const GURL& request_url() const { return request_url_; }
@@ -96,8 +97,9 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> {
// call this.
void TakeNoAction();
- int render_process_id() const { return render_process_id_; }
- int render_frame_id() const { return render_frame_id_; }
+ // Returns the manager associated with this SSLErrorHandler.
+ // Should only be accessed on the UI thread.
+ SSLManager* manager() const { return manager_; }
protected:
friend class base::RefCountedThreadSafe<SSLErrorHandler>;
@@ -105,9 +107,7 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> {
// Construct on the IO thread.
SSLErrorHandler(const base::WeakPtr<Delegate>& delegate,
ResourceType resource_type,
- const GURL& url,
- int render_process_id,
- int render_frame_id);
+ const GURL& url);
virtual ~SSLErrorHandler();
@@ -137,11 +137,6 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> {
// Call on the IO thread.
void CompleteTakeNoAction();
- // We use these members to find the correct SSLManager when we arrive on
- // the UI thread.
- int render_process_id_;
- int render_frame_id_;
-
// The URL that we requested.
// This read-only member can be accessed on any thread.
const GURL request_url_;

Powered by Google App Engine
This is Rietveld 408576698