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

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

Issue 10117034: Don't cache the IO thread in the MetricsService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Linux compile (IWYU) Created 8 years, 8 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 | « chrome/browser/chrome_browser_main_x11.cc ('k') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/memory/scoped_ptr.h" 19 #include "base/memory/scoped_ptr.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
21 #include "base/process_util.h" 21 #include "base/process_util.h"
22 #include "chrome/browser/io_thread.h"
23 #include "chrome/common/metrics/metrics_service_base.h" 22 #include "chrome/common/metrics/metrics_service_base.h"
24 #include "content/public/common/process_type.h" 23 #include "content/public/common/process_type.h"
25 #include "content/public/common/url_fetcher_delegate.h" 24 #include "content/public/common/url_fetcher_delegate.h"
26 #include "content/public/browser/notification_observer.h" 25 #include "content/public/browser/notification_observer.h"
27 #include "content/public/browser/notification_registrar.h" 26 #include "content/public/browser/notification_registrar.h"
28 27
29 #if defined(OS_CHROMEOS) 28 #if defined(OS_CHROMEOS)
30 #include "chrome/browser/chromeos/external_metrics.h" 29 #include "chrome/browser/chromeos/external_metrics.h"
31 #endif 30 #endif
32 31
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // The URLs for the XML and protobuf metrics servers. 360 // The URLs for the XML and protobuf metrics servers.
362 string16 server_url_xml_; 361 string16 server_url_xml_;
363 string16 server_url_proto_; 362 string16 server_url_proto_;
364 363
365 // The TCP/UDP echo server to collect network connectivity stats. 364 // The TCP/UDP echo server to collect network connectivity stats.
366 std::string network_stats_server_; 365 std::string network_stats_server_;
367 366
368 // The HTTP pipelining test server. 367 // The HTTP pipelining test server.
369 std::string http_pipelining_test_server_; 368 std::string http_pipelining_test_server_;
370 369
371 // The IOThread for accessing global HostResolver to resolve
372 // network_stats_server_ host. |io_thread_| is accessed on IO thread and it is
373 // safe to access it on IO thread.
374 IOThread* io_thread_;
375
376 // The identifier that's sent to the server with the log reports. 370 // The identifier that's sent to the server with the log reports.
377 std::string client_id_; 371 std::string client_id_;
378 372
379 // Whether the MetricsService object has received any notifications since 373 // Whether the MetricsService object has received any notifications since
380 // the last time a transmission was sent. 374 // the last time a transmission was sent.
381 bool idle_since_last_transmission_; 375 bool idle_since_last_transmission_;
382 376
383 // A number that identifies the how many times the app has been launched. 377 // A number that identifies the how many times the app has been launched.
384 int session_id_; 378 int session_id_;
385 379
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 friend bool prerender::IsOmniboxEnabled(Profile* profile); 432 friend bool prerender::IsOmniboxEnabled(Profile* profile);
439 friend class extensions::ExtensionDownloader; 433 friend class extensions::ExtensionDownloader;
440 434
441 // Returns true if prefs::kMetricsReportingEnabled is set. 435 // Returns true if prefs::kMetricsReportingEnabled is set.
442 static bool IsMetricsReportingEnabled(); 436 static bool IsMetricsReportingEnabled();
443 437
444 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper); 438 DISALLOW_IMPLICIT_CONSTRUCTORS(MetricsServiceHelper);
445 }; 439 };
446 440
447 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 441 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_x11.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698