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

Side by Side Diff: chromeos/geolocation/simple_geolocation_provider.h

Issue 2624843003: Add support for cellular geolocation (Closed)
Patch Set: Update device tests to use correct dict key Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_ 5 #ifndef CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_
6 #define CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_ 6 #define CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 18 matching lines...) Expand all
29 // Note: this should probably be a singleton to monitor requests rate. 29 // Note: this should probably be a singleton to monitor requests rate.
30 // But as it is used only diring ChromeOS Out-of-Box, it can be owned by 30 // But as it is used only diring ChromeOS Out-of-Box, it can be owned by
31 // WizardController for now. 31 // WizardController for now.
32 class CHROMEOS_EXPORT SimpleGeolocationProvider { 32 class CHROMEOS_EXPORT SimpleGeolocationProvider {
33 public: 33 public:
34 SimpleGeolocationProvider(net::URLRequestContextGetter* url_context_getter, 34 SimpleGeolocationProvider(net::URLRequestContextGetter* url_context_getter,
35 const GURL& url); 35 const GURL& url);
36 virtual ~SimpleGeolocationProvider(); 36 virtual ~SimpleGeolocationProvider();
37 37
38 // Initiates new request. If |send_wifi_access_points|, WiFi AP information 38 // Initiates new request. If |send_wifi_access_points|, WiFi AP information
39 // will be added to the request. See SimpleGeolocationRequest for the 39 // will be added to the request, similarly for |send_cell_towers| and Cell
40 // description of the other parameters. 40 // Tower information. See SimpleGeolocationRequest for the description of
41 // the other parameters.
41 void RequestGeolocation(base::TimeDelta timeout, 42 void RequestGeolocation(base::TimeDelta timeout,
42 bool send_wifi_access_points, 43 bool send_wifi_access_points,
44 bool send_cell_towers,
43 SimpleGeolocationRequest::ResponseCallback callback); 45 SimpleGeolocationRequest::ResponseCallback callback);
44 46
45 // Returns default geolocation service URL. 47 // Returns default geolocation service URL.
46 static GURL DefaultGeolocationProviderURL(); 48 static GURL DefaultGeolocationProviderURL();
47 49
48 private: 50 private:
49 friend class TestGeolocationAPIURLFetcherCallback; 51 friend class TestGeolocationAPIURLFetcherCallback;
50 52
51 // Geolocation response callback. Deletes request from requests_. 53 // Geolocation response callback. Deletes request from requests_.
52 void OnGeolocationResponse( 54 void OnGeolocationResponse(
(...skipping 15 matching lines...) Expand all
68 70
69 // Creation and destruction should happen on the same thread. 71 // Creation and destruction should happen on the same thread.
70 base::ThreadChecker thread_checker_; 72 base::ThreadChecker thread_checker_;
71 73
72 DISALLOW_COPY_AND_ASSIGN(SimpleGeolocationProvider); 74 DISALLOW_COPY_AND_ASSIGN(SimpleGeolocationProvider);
73 }; 75 };
74 76
75 } // namespace chromeos 77 } // namespace chromeos
76 78
77 #endif // CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_ 79 #endif // CHROMEOS_GEOLOCATION_SIMPLE_GEOLOCATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chromeos/geolocation/simple_geolocation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698