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

Unified Diff: net/base/sdch_manager.h

Issue 998803003: Checks to enforce relative lifetimes for SdchManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated comments and fixed else clause. Created 5 years, 9 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 | « no previous file | net/base/sdch_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager.h
diff --git a/net/base/sdch_manager.h b/net/base/sdch_manager.h
index c83d3a41ce59263466b7928eda2b3788bfde5ccb..93f8a74b61bcf71d0fab24b8e7a395f573929fa1 100644
--- a/net/base/sdch_manager.h
+++ b/net/base/sdch_manager.h
@@ -23,6 +23,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
@@ -292,6 +293,9 @@ class NET_EXPORT SdchManager {
static scoped_ptr<DictionarySet> CreateEmptyDictionarySetForTesting();
+ // For investigation of http://crbug.com/454198; remove when resolved.
+ base::WeakPtr<SdchManager> GetWeakPtr();
+
private:
struct BlacklistInfo {
BlacklistInfo() : count(0), exponential_count(0), reason(SDCH_OK) {}
@@ -338,6 +342,8 @@ class NET_EXPORT SdchManager {
base::ThreadChecker thread_checker_;
+ base::WeakPtrFactory<SdchManager> factory_;
+
DISALLOW_COPY_AND_ASSIGN(SdchManager);
};
« no previous file with comments | « no previous file | net/base/sdch_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698