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

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

Issue 2957383002: [Cleanup] Use a sequence checker rather than a thread checker for the metrics service. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_client.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SERVICE_CLIENT_H_ 5 #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 6 #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
11 #include <memory> 11 #include <memory>
12 #include <queue> 12 #include <queue>
13 #include <string> 13 #include <string>
14 14
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/threading/thread_checker.h" 18 #include "base/sequence_checker.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "chrome/browser/metrics/metrics_memory_details.h" 20 #include "chrome/browser/metrics/metrics_memory_details.h"
21 #include "components/metrics/metrics_log_uploader.h" 21 #include "components/metrics/metrics_log_uploader.h"
22 #include "components/metrics/metrics_service_client.h" 22 #include "components/metrics/metrics_service_client.h"
23 #include "components/metrics/profiler/tracking_synchronizer_observer.h" 23 #include "components/metrics/profiler/tracking_synchronizer_observer.h"
24 #include "components/metrics/proto/system_profile.pb.h" 24 #include "components/metrics/proto/system_profile.pb.h"
25 #include "components/omnibox/browser/omnibox_event_global_tracker.h" 25 #include "components/omnibox/browser/omnibox_event_global_tracker.h"
26 #include "components/ukm/observers/history_delete_observer.h" 26 #include "components/ukm/observers/history_delete_observer.h"
27 #include "components/ukm/observers/sync_disable_observer.h" 27 #include "components/ukm/observers/sync_disable_observer.h"
28 #include "content/public/browser/notification_observer.h" 28 #include "content/public/browser/notification_observer.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 // Called when a URL is opened from the Omnibox. 165 // Called when a URL is opened from the Omnibox.
166 void OnURLOpenedFromOmnibox(OmniboxLog* log); 166 void OnURLOpenedFromOmnibox(OmniboxLog* log);
167 167
168 #if defined(OS_WIN) 168 #if defined(OS_WIN)
169 // Counts (and removes) the browser crash dump attempt signals left behind by 169 // Counts (and removes) the browser crash dump attempt signals left behind by
170 // any previous browser processes which generated a crash dump. 170 // any previous browser processes which generated a crash dump.
171 void CountBrowserCrashDumpAttempts(); 171 void CountBrowserCrashDumpAttempts();
172 #endif // OS_WIN 172 #endif // OS_WIN
173 173
174 base::ThreadChecker thread_checker_; 174 SEQUENCE_CHECKER(sequence_checker_);
175 175
176 // Weak pointer to the MetricsStateManager. 176 // Weak pointer to the MetricsStateManager.
177 metrics::MetricsStateManager* metrics_state_manager_; 177 metrics::MetricsStateManager* metrics_state_manager_;
178 178
179 // The MetricsService that |this| is a client of. 179 // The MetricsService that |this| is a client of.
180 std::unique_ptr<metrics::MetricsService> metrics_service_; 180 std::unique_ptr<metrics::MetricsService> metrics_service_;
181 181
182 // The UkmService that |this| is a client of. 182 // The UkmService that |this| is a client of.
183 std::unique_ptr<ukm::UkmService> ukm_service_; 183 std::unique_ptr<ukm::UkmService> ukm_service_;
184 184
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Whether this client has already uploaded profiler data during this session. 250 // Whether this client has already uploaded profiler data during this session.
251 // Profiler data is uploaded at most once per session. 251 // Profiler data is uploaded at most once per session.
252 bool has_uploaded_profiler_data_; 252 bool has_uploaded_profiler_data_;
253 253
254 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; 254 base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_;
255 255
256 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); 256 DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient);
257 }; 257 };
258 258
259 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ 259 #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698