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

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

Issue 3058027: Add #include utf_string_conversions.h to all files that use ASCIIToWide and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/geolocation/network_location_provider.h" 5 #include "chrome/browser/geolocation/network_location_provider.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/geolocation/access_token_store.h" 9 #include "chrome/browser/geolocation/access_token_store.h"
9 10
10 namespace { 11 namespace {
11 // The maximum period of time we'll wait for a complete set of device data 12 // The maximum period of time we'll wait for a complete set of device data
12 // before sending the request. 13 // before sending the request.
13 const int kDataCompleteWaitPeriod = 1000 * 2; // 2 seconds 14 const int kDataCompleteWaitPeriod = 1000 * 2; // 2 seconds
14 15
15 // The maximum size of the cache of positions for previously requested device 16 // The maximum size of the cache of positions for previously requested device
16 // data. 17 // data.
17 const size_t kMaximumCacheSize = 10; 18 const size_t kMaximumCacheSize = 10;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 device_data_updated_timestamp_ = base::Time::Now(); 287 device_data_updated_timestamp_ = base::Time::Now();
287 288
288 is_new_data_available_ = is_radio_data_complete_ || is_wifi_data_complete_; 289 is_new_data_available_ = is_radio_data_complete_ || is_wifi_data_complete_;
289 UpdatePosition(); 290 UpdatePosition();
290 } 291 }
291 292
292 bool NetworkLocationProvider::IsStarted() const { 293 bool NetworkLocationProvider::IsStarted() const {
293 DCHECK_EQ(!!radio_data_provider_, !!wifi_data_provider_); 294 DCHECK_EQ(!!radio_data_provider_, !!wifi_data_provider_);
294 return wifi_data_provider_ != NULL; 295 return wifi_data_provider_ != NULL;
295 } 296 }
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/access_token_store_browsertest.cc ('k') | chrome/browser/geolocation/network_location_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698