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

Unified Diff: chrome/browser/rlz/rlz.cc

Issue 8570021: base::Bind() conversion for chrome/browser/rlz (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
« no previous file with comments | « chrome/browser/rlz/rlz.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/rlz/rlz.cc
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index 694e04556ef4ce1229566a4a4bbedd1cbcb62ce6..adf5fb799a23ff08bd7f4d1f972dffa4f240eef0 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -13,12 +13,13 @@
#include <algorithm>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/file_path.h"
#include "base/message_loop.h"
#include "base/path_service.h"
#include "base/string_util.h"
#include "base/synchronization/lock.h"
-#include "base/task.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/utf_string_conversions.h"
@@ -198,10 +199,12 @@ bool RLZTracker::Init(bool first_run, int delay, bool google_default_search,
}
void RLZTracker::ScheduleDelayedInit(int delay) {
+ // The RLZTracker is a singleton object that outlives any runnable tasks
+ // that will be queued up.
BrowserThread::PostDelayedTask(
BrowserThread::FILE,
FROM_HERE,
- NewRunnableMethod(this, &RLZTracker::DelayedInit),
+ base::Bind(&RLZTracker::DelayedInit, base::Unretained(this)),
delay);
}
@@ -391,7 +394,8 @@ bool RLZTracker::ScheduleGetAccessPointRlz(rlz_lib::AccessPoint point) {
string16* not_used = NULL;
BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,
- NewRunnableFunction(&RLZTracker::GetAccessPointRlz, point, not_used));
+ base::IgnoreReturn<bool>(
+ base::Bind(&RLZTracker::GetAccessPointRlz, point, not_used)));
return true;
}
« no previous file with comments | « chrome/browser/rlz/rlz.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698