| Index: chrome/browser/ui/google_now/google_now_service.h
|
| diff --git a/chrome/browser/ui/google_now/google_now_service.h b/chrome/browser/ui/google_now/google_now_service.h
|
| index 6debca5693f45508bd6dd9445e14818c61c34eba..edb21ca44e9b6b1ed2535f46a1826a84a00bcafe 100644
|
| --- a/chrome/browser/ui/google_now/google_now_service.h
|
| +++ b/chrome/browser/ui/google_now/google_now_service.h
|
| @@ -48,8 +48,10 @@ class GoogleNowService : public ProfileKeyedService {
|
| // Starts obtaining location of the machine.
|
| void StartObtainingGeolocation();
|
| void OnLocationObtained(const content::Geoposition& position);
|
| + void OnLocationRequestTimeout();
|
|
|
| - // Starts downloading cards from the server.
|
| + // Starts downloading cards from the server. If the position's Validate() call
|
| + // returns false, this means that the position is not available.
|
| void StartServerRequest(const content::Geoposition& position);
|
| void OnServerRequestCompleted(net::URLRequest* request, int num_bytes);
|
|
|
| @@ -64,6 +66,10 @@ class GoogleNowService : public ProfileKeyedService {
|
| Profile* const profile_;
|
| // Timer to schedule next cards update.
|
| base::OneShotTimer<GoogleNowService> next_update_timer_;
|
| + // Timer to cancel geolocation requests that take too long.
|
| + base::OneShotTimer<GoogleNowService> geolocation_request_timer_;
|
| + // Weak factory for the geolocation request callback.
|
| + base::WeakPtrFactory<GoogleNowService> geolocation_request_weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(GoogleNowService);
|
| };
|
|
|