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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 // Maps NavigationControllers (corresponding to tabs) or Browser | 395 // Maps NavigationControllers (corresponding to tabs) or Browser |
396 // (corresponding to Windows) to a unique integer that we will use to identify | 396 // (corresponding to Windows) to a unique integer that we will use to identify |
397 // it. |next_window_id_| is used to track which IDs we have used so far. | 397 // it. |next_window_id_| is used to track which IDs we have used so far. |
398 typedef std::map<uintptr_t, int> WindowMap; | 398 typedef std::map<uintptr_t, int> WindowMap; |
399 WindowMap window_map_; | 399 WindowMap window_map_; |
400 int next_window_id_; | 400 int next_window_id_; |
401 | 401 |
402 // Buffer of child process notifications for quick access. See | 402 // Buffer of child process notifications for quick access. See |
403 // ChildProcessStats documentation above for more details. | 403 // ChildProcessStats documentation above for more details. |
404 struct ChildProcessStats; | 404 struct ChildProcessStats; |
405 std::map<std::wstring, ChildProcessStats> child_process_stats_buffer_; | 405 std::map<string16, ChildProcessStats> child_process_stats_buffer_; |
406 | 406 |
407 ScopedRunnableMethodFactory<MetricsService> log_sender_factory_; | 407 ScopedRunnableMethodFactory<MetricsService> log_sender_factory_; |
408 ScopedRunnableMethodFactory<MetricsService> state_saver_factory_; | 408 ScopedRunnableMethodFactory<MetricsService> state_saver_factory_; |
409 | 409 |
410 // Dictionary containing all the profile specific metrics. This is set | 410 // Dictionary containing all the profile specific metrics. This is set |
411 // at creation time from the prefs. | 411 // at creation time from the prefs. |
412 scoped_ptr<base::DictionaryValue> profile_dictionary_; | 412 scoped_ptr<base::DictionaryValue> profile_dictionary_; |
413 | 413 |
414 // The scheduler for determining when uploads should happen. | 414 // The scheduler for determining when uploads should happen. |
415 scoped_ptr<MetricsReportingScheduler> scheduler_; | 415 scoped_ptr<MetricsReportingScheduler> scheduler_; |
(...skipping 15 matching lines...) Expand all Loading... |
431 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); | 431 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); |
432 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); | 432 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); |
433 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); | 433 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); |
434 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); | 434 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); |
435 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); | 435 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); |
436 | 436 |
437 DISALLOW_COPY_AND_ASSIGN(MetricsService); | 437 DISALLOW_COPY_AND_ASSIGN(MetricsService); |
438 }; | 438 }; |
439 | 439 |
440 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ | 440 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ |
OLD | NEW |