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

Unified Diff: net/base/sdch_manager.cc

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 | « net/base/sdch_manager.h ('k') | net/sdch/sdch_owner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/sdch_manager.cc
diff --git a/net/base/sdch_manager.cc b/net/base/sdch_manager.cc
index bcb5e32335bb07956d1e2532ecee20bf00877d02..34fc76af6ecd818a23340eaa90376892a310e8e5 100644
--- a/net/base/sdch_manager.cc
+++ b/net/base/sdch_manager.cc
@@ -243,7 +243,7 @@ void SdchManager::DictionarySet::AddDictionary(
dictionaries_[server_hash] = dictionary;
}
-SdchManager::SdchManager() {
+SdchManager::SdchManager() : factory_(this) {
DCHECK(thread_checker_.CalledOnValidThread());
}
@@ -620,6 +620,11 @@ SdchManager::CreateEmptyDictionarySetForTesting() {
return scoped_ptr<DictionarySet>(new DictionarySet).Pass();
}
+// For investigation of http://crbug.com/454198; remove when resolved.
+base::WeakPtr<SdchManager> SdchManager::GetWeakPtr() {
+ return factory_.GetWeakPtr();
+}
+
// static
void SdchManager::UrlSafeBase64Encode(const std::string& input,
std::string* output) {
« no previous file with comments | « net/base/sdch_manager.h ('k') | net/sdch/sdch_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698