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

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

Issue 296013005: [Metrics] Move Windows-specific CountBrowserCrashDumpAttempts() out of MetricsService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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) 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 10
11 #include <map> 11 #include <map>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.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 "base/memory/scoped_vector.h" 19 #include "base/memory/scoped_vector.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
21 #include "base/metrics/field_trial.h" 21 #include "base/metrics/field_trial.h"
22 #include "base/metrics/histogram_flattener.h" 22 #include "base/metrics/histogram_flattener.h"
23 #include "base/metrics/histogram_snapshot_manager.h" 23 #include "base/metrics/histogram_snapshot_manager.h"
24 #include "base/metrics/user_metrics.h" 24 #include "base/metrics/user_metrics.h"
25 #include "base/observer_list.h" 25 #include "base/observer_list.h"
26 #include "base/strings/string16.h"
26 #include "base/threading/thread_checker.h" 27 #include "base/threading/thread_checker.h"
27 #include "base/time/time.h" 28 #include "base/time/time.h"
28 #include "chrome/browser/metrics/metrics_log.h" 29 #include "chrome/browser/metrics/metrics_log.h"
29 #include "chrome/browser/metrics/tracking_synchronizer_observer.h" 30 #include "chrome/browser/metrics/tracking_synchronizer_observer.h"
30 #include "components/metrics/metrics_log_manager.h" 31 #include "components/metrics/metrics_log_manager.h"
31 #include "components/metrics/metrics_provider.h" 32 #include "components/metrics/metrics_provider.h"
32 #include "components/metrics/metrics_service_observer.h" 33 #include "components/metrics/metrics_service_observer.h"
33 #include "components/variations/active_field_trials.h" 34 #include "components/variations/active_field_trials.h"
34 #include "content/public/browser/browser_child_process_observer.h" 35 #include "content/public/browser/browser_child_process_observer.h"
35 #include "content/public/browser/user_metrics.h" 36 #include "content/public/browser/user_metrics.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 static void SetExecutionPhase(ExecutionPhase execution_phase); 201 static void SetExecutionPhase(ExecutionPhase execution_phase);
201 202
202 // Saves in the preferences if the crash report registration was successful. 203 // Saves in the preferences if the crash report registration was successful.
203 // This count is eventually send via UMA logs. 204 // This count is eventually send via UMA logs.
204 void RecordBreakpadRegistration(bool success); 205 void RecordBreakpadRegistration(bool success);
205 206
206 // Saves in the preferences if the browser is running under a debugger. 207 // Saves in the preferences if the browser is running under a debugger.
207 // This count is eventually send via UMA logs. 208 // This count is eventually send via UMA logs.
208 void RecordBreakpadHasDebugger(bool has_debugger); 209 void RecordBreakpadHasDebugger(bool has_debugger);
209 210
210 #if defined(OS_WIN)
211 // Counts (and removes) the browser crash dump attempt signals left behind by
212 // any previous browser processes which generated a crash dump.
213 void CountBrowserCrashDumpAttempts();
214 #endif // OS_WIN
215
216 #if defined(OS_CHROMEOS) 211 #if defined(OS_CHROMEOS)
217 // Records a Chrome OS crash. 212 // Records a Chrome OS crash.
218 void LogChromeOSCrash(const std::string &crash_type); 213 void LogChromeOSCrash(const std::string &crash_type);
219 #endif 214 #endif
220 215
221 bool recording_active() const; 216 bool recording_active() const;
222 bool reporting_active() const; 217 bool reporting_active() const;
223 218
224 void LogPluginLoadingError(const base::FilePath& plugin_path); 219 void LogPluginLoadingError(const base::FilePath& plugin_path);
225 220
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess); 527 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess);
533 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver); 528 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver);
534 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, 529 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest,
535 PermutedEntropyCacheClearedWhenLowEntropyReset); 530 PermutedEntropyCacheClearedWhenLowEntropyReset);
536 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); 531 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial);
537 532
538 DISALLOW_COPY_AND_ASSIGN(MetricsService); 533 DISALLOW_COPY_AND_ASSIGN(MetricsService);
539 }; 534 };
540 535
541 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_ 536 #endif // CHROME_BROWSER_METRICS_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698