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

Unified Diff: chrome/browser/renderer_host/web_cache_manager.cc

Issue 8568030: base::Bind() conversion in renderer_host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing #include for Mac Created 9 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: chrome/browser/renderer_host/web_cache_manager.cc
diff --git a/chrome/browser/renderer_host/web_cache_manager.cc b/chrome/browser/renderer_host/web_cache_manager.cc
index 0ec33fd4cbabee64600db96b495dab844a48c694..605a1b44eaa7c07a5d241017150b70c16abfc3cb 100644
--- a/chrome/browser/renderer_host/web_cache_manager.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/memory/singleton.h"
#include "base/message_loop.h"
@@ -63,7 +64,7 @@ WebCacheManager* WebCacheManager::GetInstance() {
WebCacheManager::WebCacheManager()
: global_size_limit_(GetDefaultGlobalSizeLimit()),
- ALLOW_THIS_IN_INITIALIZER_LIST(revise_allocation_factory_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
content::NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
@@ -415,8 +416,9 @@ void WebCacheManager::ReviseAllocationStrategyLater() {
// Ask to be called back in a few milliseconds to actually recompute our
// allocation.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
- revise_allocation_factory_.NewRunnableMethod(
- &WebCacheManager::ReviseAllocationStrategy),
+ base::Bind(
+ &WebCacheManager::ReviseAllocationStrategy,
+ weak_factory_.GetWeakPtr()),
kReviseAllocationDelayMS);
}
« no previous file with comments | « chrome/browser/renderer_host/web_cache_manager.h ('k') | content/browser/renderer_host/render_widget_host_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698