summaryrefslogtreecommitdiffstats
path: root/chrome/browser/rlz
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-19 16:54:00 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-19 16:54:00 +0000
commitaf00649ce4a4e34be81b489e7d14e08473d75988 (patch)
treef5adb0fc3d81d1d413f797defd6c6fa5db8aee50 /chrome/browser/rlz
parentb5d58d9402a5013d91a29f779fb8db84da287339 (diff)
downloadchromium_src-af00649ce4a4e34be81b489e7d14e08473d75988.zip
chromium_src-af00649ce4a4e34be81b489e7d14e08473d75988.tar.gz
chromium_src-af00649ce4a4e34be81b489e7d14e08473d75988.tar.bz2
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
Diffstat (limited to 'chrome/browser/rlz')
-rw-r--r--chrome/browser/rlz/rlz.cc10
-rw-r--r--chrome/browser/rlz/rlz.h6
2 files changed, 7 insertions, 9 deletions
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 <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;
}
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 <string>
#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_