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

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
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.
willchan no longer on Chromium 2011/06/08 14:07:02 Maybe you should document that this is only safe t
ramant (doing other things) 2011/06/08 17:47:17 Done.
369 IOThread* io_thread_;
370
363 // The identifier that's sent to the server with the log reports. 371 // The identifier that's sent to the server with the log reports.
364 std::string client_id_; 372 std::string client_id_;
365 373
366 // Whether the MetricsService object has received any notifications since 374 // Whether the MetricsService object has received any notifications since
367 // the last time a transmission was sent. 375 // the last time a transmission was sent.
368 bool idle_since_last_transmission_; 376 bool idle_since_last_transmission_;
369 377
370 // A number that identifies the how many times the app has been launched. 378 // A number that identifies the how many times the app has been launched.
371 int session_id_; 379 int session_id_;
372 380
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList); 427 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptSizeOfLogList);
420 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList); 428 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, CorruptChecksumOfLogList);
421 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes); 429 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesAllZeroes);
422 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly); 430 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdGeneratesCorrectly);
423 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted); 431 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ClientIdCorrectlyFormatted);
424 432
425 DISALLOW_COPY_AND_ASSIGN(MetricsService); 433 DISALLOW_COPY_AND_ASSIGN(MetricsService);
426 }; 434 };
427 435
428 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 436 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_service.cc » ('j') | chrome/browser/metrics/metrics_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698