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

Unified Diff: content/browser/appcache/appcache_dispatcher_host.h

Issue 1441683004: AppCache: Use WeakPtr<> to fix a potential uaf bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | content/browser/appcache/appcache_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_dispatcher_host.h
diff --git a/content/browser/appcache/appcache_dispatcher_host.h b/content/browser/appcache/appcache_dispatcher_host.h
index 30d2f86f71c822182b8d1e1aab400f0ec6a71b4f..f8909a88125a49ffc17087eac6727398e4485890 100644
--- a/content/browser/appcache/appcache_dispatcher_host.h
+++ b/content/browser/appcache/appcache_dispatcher_host.h
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/process/process.h"
#include "content/browser/appcache/appcache_backend_impl.h"
#include "content/browser/appcache/appcache_frontend_proxy.h"
@@ -69,6 +70,8 @@ class AppCacheDispatcherHost : public BrowserMessageFilter {
// The corresponding ChildProcessHost object's id().
int process_id_;
+ base::WeakPtrFactory<AppCacheDispatcherHost> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AppCacheDispatcherHost);
};
« no previous file with comments | « no previous file | content/browser/appcache/appcache_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698