Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: chrome/browser/metrics/metrics_service.h

Issue 7056031: Collect stats to investigate the viability of UDP (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 11
12 #include <map> 12 #include <map>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/basictypes.h" 16 #include "base/basictypes.h"
17 #include "base/gtest_prod_util.h" 17 #include "base/gtest_prod_util.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "chrome/browser/io_thread.h"
19 #include "chrome/common/metrics_helpers.h" 20 #include "chrome/common/metrics_helpers.h"
20 #include "content/common/notification_observer.h" 21 #include "content/common/notification_observer.h"
21 #include "content/common/notification_registrar.h" 22 #include "content/common/notification_registrar.h"
22 #include "content/common/url_fetcher.h" 23 #include "content/common/url_fetcher.h"
23 24
24 #if defined(OS_CHROMEOS) 25 #if defined(OS_CHROMEOS)
25 #include "chrome/browser/chromeos/external_metrics.h" 26 #include "chrome/browser/chromeos/external_metrics.h"
26 #endif 27 #endif
27 28
28 class BookmarkModel; 29 class BookmarkModel;
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 354
354 // The list of plugins which was retrieved on the file thread. 355 // The list of plugins which was retrieved on the file thread.
355 std::vector<webkit::npapi::WebPluginInfo> plugins_; 356 std::vector<webkit::npapi::WebPluginInfo> plugins_;
356 357
357 // The outstanding transmission appears as a URL Fetch operation. 358 // The outstanding transmission appears as a URL Fetch operation.
358 scoped_ptr<URLFetcher> current_fetch_; 359 scoped_ptr<URLFetcher> current_fetch_;
359 360
360 // The URL for the metrics server. 361 // The URL for the metrics server.
361 std::wstring server_url_; 362 std::wstring server_url_;
362 363
364 // The TCP/UDP echo server to collect network connectivity stats.
365 std::string network_stats_server_;
366
367 // The IOThread for accessing global HostResolver to resolve
368 // network_stats_server_ host. |io_thread_| is accessed on IO thread and it is
369 // safe to access it on IO thread.
370 IOThread* io_thread_;
371
363 // The identifier that's sent to the server with the log reports. 372 // The identifier that's sent to the server with the log reports.
364 std::string client_id_; 373 std::string client_id_;
365 374
366 // Whether the MetricsService object has received any notifications since 375 // Whether the MetricsService object has received any notifications since
367 // the last time a transmission was sent. 376 // the last time a transmission was sent.
368 bool idle_since_last_transmission_; 377 bool idle_since_last_transmission_;
369 378
370 // A number that identifies the how many times the app has been launched. 379 // A number that identifies the how many times the app has been launched.
371 int session_id_; 380 int session_id_;
372 381
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); 428 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList);
420 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); 429 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList);
421 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); 430 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes);
422 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); 431 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly);
423 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); 432 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted);
424 433
425 DISALLOW_COPY_AND_ASSIGN(MetricsService); 434 DISALLOW_COPY_AND_ASSIGN(MetricsService);
426 }; 435 };
427 436
428 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 437 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698