| OLD | NEW |
| 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_ | 5 #ifndef CHROME_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_ |
| 6 #define CHROME_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_ | 6 #define CHROME_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 const WifiData& wifi_data, | 57 const WifiData& wifi_data, |
| 58 const base::Time& timestamp); | 58 const base::Time& timestamp); |
| 59 | 59 |
| 60 bool is_request_pending() const { return url_fetcher_ != NULL; } | 60 bool is_request_pending() const { return url_fetcher_ != NULL; } |
| 61 const GURL& url() const { return url_; } | 61 const GURL& url() const { return url_; } |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // URLFetcher::Delegate | 64 // URLFetcher::Delegate |
| 65 virtual void OnURLFetchComplete(const URLFetcher* source, | 65 virtual void OnURLFetchComplete(const URLFetcher* source, |
| 66 const GURL& url, | 66 const GURL& url, |
| 67 const URLRequestStatus& status, | 67 const net::URLRequestStatus& status, |
| 68 int response_code, | 68 int response_code, |
| 69 const ResponseCookies& cookies, | 69 const ResponseCookies& cookies, |
| 70 const std::string& data); | 70 const std::string& data); |
| 71 | 71 |
| 72 scoped_refptr<URLRequestContextGetter> url_context_; | 72 scoped_refptr<URLRequestContextGetter> url_context_; |
| 73 ListenerInterface* listener_; | 73 ListenerInterface* listener_; |
| 74 const GURL url_; | 74 const GURL url_; |
| 75 scoped_ptr<URLFetcher> url_fetcher_; | 75 scoped_ptr<URLFetcher> url_fetcher_; |
| 76 | 76 |
| 77 // Keep a copy of the data sent in the request, so we can refer back to it | 77 // Keep a copy of the data sent in the request, so we can refer back to it |
| 78 // when the response arrives. | 78 // when the response arrives. |
| 79 GatewayData gateway_data_; | 79 GatewayData gateway_data_; |
| 80 RadioData radio_data_; | 80 RadioData radio_data_; |
| 81 WifiData wifi_data_; | 81 WifiData wifi_data_; |
| 82 base::Time timestamp_; // Timestamp of the above data, not of the request. | 82 base::Time timestamp_; // Timestamp of the above data, not of the request. |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(NetworkLocationRequest); | 84 DISALLOW_COPY_AND_ASSIGN(NetworkLocationRequest); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 #endif // CHROME_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_ | 87 #endif // CHROME_BROWSER_GEOLOCATION_NETWORK_LOCATION_REQUEST_H_ |
| OLD | NEW |