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

Unified Diff: chrome/browser/oom_priority_manager.cc

Issue 8960010: base::Bind: Convert NewRunnableMethod in chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix 55. Created 9 years 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 | « chrome/browser/oom_priority_manager.h ('k') | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/oom_priority_manager.cc
diff --git a/chrome/browser/oom_priority_manager.cc b/chrome/browser/oom_priority_manager.cc
index d73687718ff526b44514d37f451079bc8e0f3bbd..abbffaf888ef5cb38c635c7816b128fae61e6c7d 100644
--- a/chrome/browser/oom_priority_manager.cc
+++ b/chrome/browser/oom_priority_manager.cc
@@ -7,6 +7,8 @@
#include <algorithm>
#include <vector>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/process.h"
#include "base/process_util.h"
#include "base/string16.h"
@@ -181,8 +183,8 @@ void OomPriorityManager::AdjustFocusedTabScoreOnFileThread() {
void OomPriorityManager::OnFocusTabScoreAdjustmentTimeout() {
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
- NewRunnableMethod(
- this, &OomPriorityManager::AdjustFocusedTabScoreOnFileThread));
+ base::Bind(&OomPriorityManager::AdjustFocusedTabScoreOnFileThread,
+ base::Unretained(this)));
}
void OomPriorityManager::Observe(int type,
@@ -251,9 +253,8 @@ void OomPriorityManager::AdjustOomPriorities() {
TabStatsList stats_list = GetTabStatsOnUIThread();
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
- NewRunnableMethod(this,
- &OomPriorityManager::AdjustOomPrioritiesOnFileThread,
- stats_list));
+ base::Bind(&OomPriorityManager::AdjustOomPrioritiesOnFileThread,
+ base::Unretained(this), stats_list));
}
OomPriorityManager::TabStatsList OomPriorityManager::GetTabStatsOnUIThread() {
« no previous file with comments | « chrome/browser/oom_priority_manager.h ('k') | chrome/browser/renderer_host/chrome_render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698