From af00649ce4a4e34be81b489e7d14e08473d75988 Mon Sep 17 00:00:00 2001 From: "dcheng@chromium.org" Date: Sat, 19 Nov 2011 16:54:00 +0000 Subject: base::Bind() conversion for chrome/browser/rlz BUG=none TEST=trybot runs Review URL: http://codereview.chromium.org/8570021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110841 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/rlz/rlz.cc | 10 +++++++--- chrome/browser/rlz/rlz.h | 6 ------ 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'chrome/browser/rlz') diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index 694e045..adf5fb7 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -13,12 +13,13 @@ #include +#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( + base::Bind(&RLZTracker::GetAccessPointRlz, point, not_used))); return true; } diff --git a/chrome/browser/rlz/rlz.h b/chrome/browser/rlz/rlz.h index ee97a22..7145085 100644 --- a/chrome/browser/rlz/rlz.h +++ b/chrome/browser/rlz/rlz.h @@ -14,10 +14,8 @@ #include #include "base/basictypes.h" -#include "base/memory/ref_counted.h" #include "base/memory/singleton.h" #include "base/string16.h" -#include "base/task.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "rlz/win/lib/rlz_lib.h" @@ -150,10 +148,6 @@ class RLZTracker : public content::NotificationObserver { DISALLOW_COPY_AND_ASSIGN(RLZTracker); }; -// The RLZTracker is a singleton object that outlives any runnable tasks -// that will be queued up. -DISABLE_RUNNABLE_METHOD_REFCOUNT(RLZTracker); - #endif // defined(OS_WIN) #endif // CHROME_BROWSER_RLZ_RLZ_H_ -- cgit v1.1