Chromium Code Reviews| Index: chrome/browser/rlz/rlz.cc |
| diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc |
| index 91f447c16279b6f11b3bc10ece858b50671c9601..6c1e94876e94709c48bc6e1c1bbfd511b0e7ae37 100644 |
| --- a/chrome/browser/rlz/rlz.cc |
| +++ b/chrome/browser/rlz/rlz.cc |
| @@ -8,9 +8,6 @@ |
| #include "chrome/browser/rlz/rlz.h" |
| -#include <windows.h> |
| -#include <process.h> |
| - |
| #include <algorithm> |
| #include "base/bind.h" |
| @@ -231,21 +228,15 @@ void RLZTracker::DelayedInit() { |
| } |
| void RLZTracker::ScheduleFinancialPing() { |
| - // Investigate why _beginthread() is used here, and not chrome's threading |
| - // API. Tracked in bug http://crbug.com/106213 |
| - _beginthread(PingNow, 0, this); |
| -} |
| - |
| -// static |
| -void _cdecl RLZTracker::PingNow(void* arg) { |
| - RLZTracker* tracker = reinterpret_cast<RLZTracker*>(arg); |
| - tracker->PingNowImpl(); |
| + // TODO(thakis): Once akalin's TaskRunner around PostDelayedTask() is done, |
|
akalin
2012/02/16 01:22:24
PostDelayedTask() -> PostTask()?
Nico
2012/02/16 01:27:13
Done.
|
| + // use that instead of the file thread. |
| + BrowserThread::PostTask( |
| + BrowserThread::FILE, |
| + FROM_HERE, |
| + base::Bind(&RLZTracker::PingNowImpl, base::Unretained(this))); |
| } |
| void RLZTracker::PingNowImpl() { |
| - // This is the entry point of a background thread, so I/O is allowed. |
| - base::ThreadRestrictions::ScopedAllowIO allow_io; |
| - |
| string16 lang; |
| GoogleUpdateSettings::GetLanguage(&lang); |
| if (lang.empty()) |