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

Side by Side Diff: chrome/browser/geolocation/wifi_data_provider_chromeos.cc

Issue 10026013: Update use of TimeDelta in chrome/browser/*, ui/views/*, and other places. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Provides wifi scan API binding for chromeos, using proprietary APIs. 5 // Provides wifi scan API binding for chromeos, using proprietary APIs.
6 6
7 #include "chrome/browser/geolocation/wifi_data_provider_chromeos.h" 7 #include "chrome/browser/geolocation/wifi_data_provider_chromeos.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 } 209 }
210 210
211 void WifiDataProviderChromeOs::ScheduleNextScan(int interval) { 211 void WifiDataProviderChromeOs::ScheduleNextScan(int interval) {
212 DCHECK(CalledOnClientThread()); 212 DCHECK(CalledOnClientThread());
213 DCHECK(started_); 213 DCHECK(started_);
214 BrowserThread::PostDelayedTask( 214 BrowserThread::PostDelayedTask(
215 BrowserThread::UI, 215 BrowserThread::UI,
216 FROM_HERE, 216 FROM_HERE,
217 base::Bind(&WifiDataProviderChromeOs::DoWifiScanTaskOnUIThread, this), 217 base::Bind(&WifiDataProviderChromeOs::DoWifiScanTaskOnUIThread, this),
218 interval); 218 base::TimeDelta::FromMilliseconds(interval));
219 } 219 }
220 220
221 void WifiDataProviderChromeOs::ScheduleStop() { 221 void WifiDataProviderChromeOs::ScheduleStop() {
222 DCHECK(CalledOnClientThread()); 222 DCHECK(CalledOnClientThread());
223 DCHECK(started_); 223 DCHECK(started_);
224 started_ = false; 224 started_ = false;
225 BrowserThread::PostTask( 225 BrowserThread::PostTask(
226 BrowserThread::UI, 226 BrowserThread::UI,
227 FROM_HERE, 227 FROM_HERE,
228 base::Bind(&WifiDataProviderChromeOs::DoStopTaskOnUIThread, this)); 228 base::Bind(&WifiDataProviderChromeOs::DoStopTaskOnUIThread, this));
229 } 229 }
230 230
231 void WifiDataProviderChromeOs::ScheduleStart() { 231 void WifiDataProviderChromeOs::ScheduleStart() {
232 DCHECK(CalledOnClientThread()); 232 DCHECK(CalledOnClientThread());
233 DCHECK(!started_); 233 DCHECK(!started_);
234 started_ = true; 234 started_ = true;
235 // Perform first scan ASAP regardless of the polling policy. If this scan 235 // Perform first scan ASAP regardless of the polling policy. If this scan
236 // fails we'll retry at a rate in line with the polling policy. 236 // fails we'll retry at a rate in line with the polling policy.
237 BrowserThread::PostTask( 237 BrowserThread::PostTask(
238 BrowserThread::UI, 238 BrowserThread::UI,
239 FROM_HERE, 239 FROM_HERE,
240 base::Bind(&WifiDataProviderChromeOs::DoStartTaskOnUIThread, this)); 240 base::Bind(&WifiDataProviderChromeOs::DoStartTaskOnUIThread, this));
241 } 241 }
OLDNEW
« no previous file with comments | « chrome/browser/debugger/devtools_sanity_browsertest.cc ('k') | chrome/browser/ui/views/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698