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

Side by Side Diff: content/browser/geolocation/location_arbitrator_impl.h

Issue 2028823002: Refactor to make BlimpLocationProvider accessible to content layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses kmarshall's and mvanouwerkerk's comments + code clean up Created 4 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_
6 #define CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 AccessTokenStore* access_token_store, 60 AccessTokenStore* access_token_store,
61 net::URLRequestContextGetter* context, 61 net::URLRequestContextGetter* context,
62 const GURL& url, 62 const GURL& url,
63 const base::string16& access_token); 63 const base::string16& access_token);
64 virtual LocationProvider* NewSystemLocationProvider(); 64 virtual LocationProvider* NewSystemLocationProvider();
65 virtual base::Time GetTimeNow() const; 65 virtual base::Time GetTimeNow() const;
66 66
67 private: 67 private:
68 // Takes ownership of |provider| on entry; it will either be added to 68 // Takes ownership of |provider| on entry; it will either be added to
69 // |providers_| or deleted on error (e.g. it fails to start). 69 // |providers_| or deleted on error (e.g. it fails to start).
70 void RegisterProvider(LocationProvider* provider); 70 void RegisterProvider(LocationProvider* provider);
Wez 2016/06/10 23:40:34 nit: Since we're already modifying this header, co
CJ 2016/06/13 23:45:20 Done.
71 void RegisterSystemProvider();
Kevin M 2016/06/09 20:36:44 Separate functions w/leading comments with a newli
CJ 2016/06/09 23:07:06 Done.
71 void OnAccessTokenStoresLoaded( 72 void OnAccessTokenStoresLoaded(
72 AccessTokenStore::AccessTokenMap access_token_map, 73 AccessTokenStore::AccessTokenMap access_token_map,
73 net::URLRequestContextGetter* context_getter); 74 net::URLRequestContextGetter* context_getter);
74 void DoStartProviders(); 75 void DoStartProviders();
75 76
76 // Gets called when a provider has a new position. 77 // Gets called when a provider has a new position.
77 void OnLocationUpdate(const LocationProvider* provider, 78 void OnLocationUpdate(const LocationProvider* provider,
78 const Geoposition& new_position); 79 const Geoposition& new_position);
79 80
80 // Returns true if |new_position| is an improvement over |old_position|. 81 // Returns true if |new_position| is an improvement over |old_position|.
(...skipping 20 matching lines...) Expand all
101 DISALLOW_COPY_AND_ASSIGN(LocationArbitratorImpl); 102 DISALLOW_COPY_AND_ASSIGN(LocationArbitratorImpl);
102 }; 103 };
103 104
104 // Factory functions for the various types of location provider to abstract 105 // Factory functions for the various types of location provider to abstract
105 // over the platform-dependent implementations. 106 // over the platform-dependent implementations.
106 LocationProvider* NewSystemLocationProvider(); 107 LocationProvider* NewSystemLocationProvider();
107 108
108 } // namespace content 109 } // namespace content
109 110
110 #endif // CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_ 111 #endif // CONTENT_BROWSER_GEOLOCATION_LOCATION_ARBITRATOR_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698