OLD | NEW |
1 // Copyright (c) 2011 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 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // Record stats, client ID, Session ID, etc. in a special "first" log. | 224 // Record stats, client ID, Session ID, etc. in a special "first" log. |
225 void PrepareInitialLog(); | 225 void PrepareInitialLog(); |
226 | 226 |
227 // Prepared the staged log to be passed to the server. Upon return, | 227 // Prepared the staged log to be passed to the server. Upon return, |
228 // current_fetch_ should be reset with its upload data set to a compressed | 228 // current_fetch_ should be reset with its upload data set to a compressed |
229 // copy of the staged log. | 229 // copy of the staged log. |
230 void PrepareFetchWithStagedLog(); | 230 void PrepareFetchWithStagedLog(); |
231 | 231 |
232 // Implementation of content::URLFetcherDelegate. Called after transmission | 232 // Implementation of content::URLFetcherDelegate. Called after transmission |
233 // completes (either successfully or with failure). | 233 // completes (either successfully or with failure). |
234 virtual void OnURLFetchComplete(const URLFetcher* source); | 234 virtual void OnURLFetchComplete(const content::URLFetcher* source); |
235 | 235 |
236 // Logs debugging details, for the case where the server returns a response | 236 // Logs debugging details, for the case where the server returns a response |
237 // code other than 200. | 237 // code other than 200. |
238 void LogBadResponseCode(); | 238 void LogBadResponseCode(); |
239 | 239 |
240 // Records a window-related notification. | 240 // Records a window-related notification. |
241 void LogWindowChange(int type, | 241 void LogWindowChange(int type, |
242 const content::NotificationSource& source, | 242 const content::NotificationSource& source, |
243 const content::NotificationDetails& details); | 243 const content::NotificationDetails& details); |
244 | 244 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 // Chrome OS hardware class (e.g., hardware qualification ID). This | 320 // Chrome OS hardware class (e.g., hardware qualification ID). This |
321 // class identifies the configured system components such as CPU, | 321 // class identifies the configured system components such as CPU, |
322 // WiFi adapter, etc. For non Chrome OS hosts, this will be an | 322 // WiFi adapter, etc. For non Chrome OS hosts, this will be an |
323 // empty string. | 323 // empty string. |
324 std::string hardware_class_; | 324 std::string hardware_class_; |
325 | 325 |
326 // The list of plugins which was retrieved on the file thread. | 326 // The list of plugins which was retrieved on the file thread. |
327 std::vector<webkit::WebPluginInfo> plugins_; | 327 std::vector<webkit::WebPluginInfo> plugins_; |
328 | 328 |
329 // The outstanding transmission appears as a URL Fetch operation. | 329 // The outstanding transmission appears as a URL Fetch operation. |
330 scoped_ptr<URLFetcher> current_fetch_; | 330 scoped_ptr<content::URLFetcher> current_fetch_; |
331 | 331 |
332 // The URL for the metrics server. | 332 // The URL for the metrics server. |
333 std::wstring server_url_; | 333 std::wstring server_url_; |
334 | 334 |
335 // The TCP/UDP echo server to collect network connectivity stats. | 335 // The TCP/UDP echo server to collect network connectivity stats. |
336 std::string network_stats_server_; | 336 std::string network_stats_server_; |
337 | 337 |
338 // The IOThread for accessing global HostResolver to resolve | 338 // The IOThread for accessing global HostResolver to resolve |
339 // network_stats_server_ host. |io_thread_| is accessed on IO thread and it is | 339 // network_stats_server_ host. |io_thread_| is accessed on IO thread and it is |
340 // safe to access it on IO thread. | 340 // safe to access it on IO thread. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 friend class InstantFieldTrial; | 400 friend class InstantFieldTrial; |
401 friend bool prerender::IsOmniboxEnabled(Profile* profile); | 401 friend bool prerender::IsOmniboxEnabled(Profile* profile); |
402 | 402 |
403 // Returns true if prefs::kMetricsReportingEnabled is set. | 403 // Returns true if prefs::kMetricsReportingEnabled is set. |
404 static bool IsMetricsReportingEnabled(); | 404 static bool IsMetricsReportingEnabled(); |
405 | 405 |
406 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); | 406 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); |
407 }; | 407 }; |
408 | 408 |
409 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 409 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |