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

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

Issue 2221833005: Adding support for sampling crashes in Chrome on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rkaplow's comments Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_ 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_
6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_ 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 std::unique_ptr<rappor::RapporService> CreateRapporService() override; 48 std::unique_ptr<rappor::RapporService> CreateRapporService() override;
49 std::unique_ptr<variations::VariationsService> CreateVariationsService() 49 std::unique_ptr<variations::VariationsService> CreateVariationsService()
50 override; 50 override;
51 std::unique_ptr<metrics::MetricsServiceClient> CreateMetricsServiceClient() 51 std::unique_ptr<metrics::MetricsServiceClient> CreateMetricsServiceClient()
52 override; 52 override;
53 net::URLRequestContextGetter* GetURLRequestContext() override; 53 net::URLRequestContextGetter* GetURLRequestContext() override;
54 bool IsSafeBrowsingEnabled(const base::Closure& on_update_callback) override; 54 bool IsSafeBrowsingEnabled(const base::Closure& on_update_callback) override;
55 bool IsMetricsReportingEnabled() override; 55 bool IsMetricsReportingEnabled() override;
56 bool OnlyDoMetricsRecording() override; 56 bool OnlyDoMetricsRecording() override;
57 57
58 #if defined(OS_WIN)
59 // On Windows, the client controls if crashpad can upload crash reports.
Mark Mentovai 2016/08/11 18:32:25 Crashpad, proper name, capital C
Mark Mentovai 2016/08/11 18:32:25 if→whether
jwd 2016/08/11 21:41:03 Done.
jwd 2016/08/11 21:41:03 Done.
60 void UpdateRunningServices(bool may_record, bool may_upload) override;
61 #endif // defined(OS_WIN)
62
58 // Gets the MetricsStateManager, creating it if it has not already been 63 // Gets the MetricsStateManager, creating it if it has not already been
59 // created. 64 // created.
60 metrics::MetricsStateManager* GetMetricsStateManager(); 65 metrics::MetricsStateManager* GetMetricsStateManager();
61 66
62 // MetricsStateManager which is passed as a parameter to service constructors. 67 // MetricsStateManager which is passed as a parameter to service constructors.
63 std::unique_ptr<metrics::MetricsStateManager> metrics_state_manager_; 68 std::unique_ptr<metrics::MetricsStateManager> metrics_state_manager_;
64 69
65 // EnabledStateProvider to communicate if the client has consented to metrics 70 // EnabledStateProvider to communicate if the client has consented to metrics
66 // reporting, and if it's enabled. 71 // reporting, and if it's enabled.
67 std::unique_ptr<metrics::EnabledStateProvider> enabled_state_provider_; 72 std::unique_ptr<metrics::EnabledStateProvider> enabled_state_provider_;
68 73
69 // Ensures that all functions are called from the same thread. 74 // Ensures that all functions are called from the same thread.
70 base::ThreadChecker thread_checker_; 75 base::ThreadChecker thread_checker_;
71 76
72 // Weak pointer to the local state prefs store. 77 // Weak pointer to the local state prefs store.
73 PrefService* local_state_; 78 PrefService* local_state_;
74 79
75 // Subscription to SafeBrowsing service state changes. 80 // Subscription to SafeBrowsing service state changes.
76 std::unique_ptr<safe_browsing::SafeBrowsingService::StateSubscription> 81 std::unique_ptr<safe_browsing::SafeBrowsingService::StateSubscription>
77 sb_state_subscription_; 82 sb_state_subscription_;
78 83
79 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServicesManagerClient); 84 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServicesManagerClient);
80 }; 85 };
81 86
82 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_ 87 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICES_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698