| 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 // This file defines a service that collects information about the user | 5 // This file defines a service that collects information about the user |
| 6 // experience in order to help improve future versions of the app. | 6 // experience in order to help improve future versions of the app. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 8 #ifndef CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 9 #define CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| 10 #pragma once | 10 #pragma once |
| 11 | 11 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 267 |
| 268 // Convert pending_log_ to XML, compress it, and prepare to pass to server. | 268 // Convert pending_log_ to XML, compress it, and prepare to pass to server. |
| 269 // Upon return, current_fetch_ should be reset with its upload data set to | 269 // Upon return, current_fetch_ should be reset with its upload data set to |
| 270 // a compressed copy of the pending log. | 270 // a compressed copy of the pending log. |
| 271 void PrepareFetchWithPendingLog(); | 271 void PrepareFetchWithPendingLog(); |
| 272 | 272 |
| 273 // Implementation of URLFetcher::Delegate. Called after transmission | 273 // Implementation of URLFetcher::Delegate. Called after transmission |
| 274 // completes (either successfully or with failure). | 274 // completes (either successfully or with failure). |
| 275 virtual void OnURLFetchComplete(const URLFetcher* source, | 275 virtual void OnURLFetchComplete(const URLFetcher* source, |
| 276 const GURL& url, | 276 const GURL& url, |
| 277 const URLRequestStatus& status, | 277 const net::URLRequestStatus& status, |
| 278 int response_code, | 278 int response_code, |
| 279 const ResponseCookies& cookies, | 279 const ResponseCookies& cookies, |
| 280 const std::string& data); | 280 const std::string& data); |
| 281 | 281 |
| 282 // Called by OnURLFetchComplete to handle the case when the server returned | 282 // Called by OnURLFetchComplete to handle the case when the server returned |
| 283 // a response code not equal to 200. | 283 // a response code not equal to 200. |
| 284 void HandleBadResponseCode(); | 284 void HandleBadResponseCode(); |
| 285 | 285 |
| 286 // Class to hold all attributes that gets inherited by children in the UMA | 286 // Class to hold all attributes that gets inherited by children in the UMA |
| 287 // response data xml tree. This is to make it convenient in the | 287 // response data xml tree. This is to make it convenient in the |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); | 497 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); |
| 498 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); | 498 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); |
| 499 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); | 499 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); |
| 500 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); | 500 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); |
| 501 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); | 501 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); |
| 502 | 502 |
| 503 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 503 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
| 504 }; | 504 }; |
| 505 | 505 |
| 506 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 506 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
| OLD | NEW |