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

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

Issue 9404021: rlz: Remove #include <windows.h> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 months 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') | chrome/browser/rlz/rlz_unittest.cc » ('j') | 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 91f447c16279b6f11b3bc10ece858b50671c9601..60aa3d8ead542897d0f2d01645b840003c9994f1 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 PostTask() is 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())
« no previous file with comments | « chrome/browser/rlz/rlz.h ('k') | chrome/browser/rlz/rlz_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698