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

Unified Diff: content/browser/gpu/shader_disk_cache.cc

Issue 16911005: Fixing flaky ExtensionBrowsingDataTest.BrowsingDataRemovalMask test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/shader_disk_cache.cc
diff --git a/content/browser/gpu/shader_disk_cache.cc b/content/browser/gpu/shader_disk_cache.cc
index 50d31d9e10f01e32f9011e5e012da62cce7367e0..25e616ddf3f71fcd22ad33671efd101e6a7c4349 100644
--- a/content/browser/gpu/shader_disk_cache.cc
+++ b/content/browser/gpu/shader_disk_cache.cc
@@ -103,7 +103,9 @@ class ShaderDiskReadHelper
DISALLOW_COPY_AND_ASSIGN(ShaderDiskReadHelper);
};
-class ShaderClearHelper : public base::RefCounted<ShaderClearHelper> {
+class ShaderClearHelper
+ : public base::RefCounted<ShaderClearHelper>,
+ public base::SupportsWeakPtr<ShaderClearHelper> {
public:
ShaderClearHelper(scoped_refptr<ShaderDiskCache> cache,
const base::FilePath& path,
@@ -382,13 +384,13 @@ void ShaderClearHelper::DoClearShaderCache(int rv) {
switch (op_type_) {
case VERIFY_CACHE_SETUP:
rv = cache_->SetAvailableCallback(
- base::Bind(&ShaderClearHelper::DoClearShaderCache, this));
+ base::Bind(&ShaderClearHelper::DoClearShaderCache, AsWeakPtr()));
op_type_ = DELETE_CACHE;
break;
case DELETE_CACHE:
rv = cache_->Clear(
delete_begin_, delete_end_,
- base::Bind(&ShaderClearHelper::DoClearShaderCache, this));
+ base::Bind(&ShaderClearHelper::DoClearShaderCache, AsWeakPtr()));
op_type_ = TERMINATE;
break;
case TERMINATE:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698