[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
| 6 | #define CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
| 7 | |
avi | 6846aef | 2015-12-26 01:09:38 | [diff] [blame] | 8 | #include <stdint.h> |
| 9 | |
manzagop | 14aff5d | 2016-11-23 17:27:00 | [diff] [blame] | 10 | #include <deque> |
dcheng | 1edb03a | 2016-04-14 17:20:29 | [diff] [blame] | 11 | #include <memory> |
huangs | e0fa6fd | 2016-11-04 20:41:10 | [diff] [blame] | 12 | #include <queue> |
[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 13 | #include <string> |
| 14 | |
[email protected] | 4b4892b | 2014-05-22 15:06:15 | [diff] [blame] | 15 | #include "base/callback.h" |
avi | 6846aef | 2015-12-26 01:09:38 | [diff] [blame] | 16 | #include "base/macros.h" |
[email protected] | 4b4892b | 2014-05-22 15:06:15 | [diff] [blame] | 17 | #include "base/memory/weak_ptr.h" |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 18 | #include "base/threading/thread_checker.h" |
avi | 6846aef | 2015-12-26 01:09:38 | [diff] [blame] | 19 | #include "build/build_config.h" |
asvitkine | 89406d1f | 2015-01-17 06:57:10 | [diff] [blame] | 20 | #include "chrome/browser/metrics/metrics_memory_details.h" |
rkaplow | 9c42082 | 2017-02-24 15:29:57 | [diff] [blame] | 21 | #include "components/metrics/metrics_log_uploader.h" |
[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 22 | #include "components/metrics/metrics_service_client.h" |
gunsch | 840bc41 | 2014-09-18 19:38:06 | [diff] [blame] | 23 | #include "components/metrics/profiler/tracking_synchronizer_observer.h" |
manzagop | a5d6688d | 2016-10-25 20:16:03 | [diff] [blame] | 24 | #include "components/metrics/proto/system_profile.pb.h" |
blundell | 26b9524 | 2015-08-17 10:29:24 | [diff] [blame] | 25 | #include "components/omnibox/browser/omnibox_event_global_tracker.h" |
holte | 7b74c62 | 2017-01-23 23:13:07 | [diff] [blame] | 26 | #include "components/ukm/observers/history_delete_observer.h" |
holte | 1334c0aa | 2017-02-09 22:52:41 | [diff] [blame] | 27 | #include "components/ukm/observers/sync_disable_observer.h" |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 28 | #include "content/public/browser/notification_observer.h" |
| 29 | #include "content/public/browser/notification_registrar.h" |
brettw | 4b46108 | 2016-11-19 18:55:16 | [diff] [blame] | 30 | #include "ppapi/features/features.h" |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 31 | |
wfh | c768983fa | 2016-06-08 16:40:33 | [diff] [blame] | 32 | class AntiVirusMetricsProvider; |
[email protected] | 51994b2 | 2014-05-30 13:24:21 | [diff] [blame] | 33 | class ChromeOSMetricsProvider; |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 34 | class GoogleUpdateMetricsProviderWin; |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 35 | class PluginMetricsProvider; |
holte | 7b74c62 | 2017-01-23 23:13:07 | [diff] [blame] | 36 | class Profile; |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 37 | class PrefRegistrySimple; |
[email protected] | 7aee4f7e | 2014-08-12 01:15:03 | [diff] [blame] | 38 | |
manzagop | f232266 | 2016-09-27 11:39:59 | [diff] [blame] | 39 | namespace browser_watcher { |
| 40 | class WatcherMetricsProviderWin; |
| 41 | } // namespace browser_watcher |
| 42 | |
[email protected] | 037642f | 2014-05-29 20:40:50 | [diff] [blame] | 43 | namespace metrics { |
blundell | b5c6b5a | 2015-07-30 20:18:30 | [diff] [blame] | 44 | class DriveMetricsProvider; |
asvitkine | cbd42073 | 2014-08-26 22:15:40 | [diff] [blame] | 45 | class MetricsService; |
[email protected] | 037642f | 2014-05-29 20:40:50 | [diff] [blame] | 46 | class MetricsStateManager; |
gunsch | 840bc41 | 2014-09-18 19:38:06 | [diff] [blame] | 47 | class ProfilerMetricsProvider; |
siggi | 5e62f7e | 2014-11-21 21:55:45 | [diff] [blame] | 48 | } // namespace metrics |
[email protected] | 037642f | 2014-05-29 20:40:50 | [diff] [blame] | 49 | |
[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 50 | // ChromeMetricsServiceClient provides an implementation of MetricsServiceClient |
| 51 | // that depends on chrome/. |
holte | 7b74c62 | 2017-01-23 23:13:07 | [diff] [blame] | 52 | class ChromeMetricsServiceClient : public metrics::MetricsServiceClient, |
| 53 | public metrics::TrackingSynchronizerObserver, |
| 54 | public content::NotificationObserver, |
holte | 1334c0aa | 2017-02-09 22:52:41 | [diff] [blame] | 55 | public ukm::HistoryDeleteObserver, |
| 56 | public ukm::SyncDisableObserver { |
[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 57 | public: |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 58 | ~ChromeMetricsServiceClient() override; |
[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 59 | |
[email protected] | 037642f | 2014-05-29 20:40:50 | [diff] [blame] | 60 | // Factory function. |
dcheng | 1edb03a | 2016-04-14 17:20:29 | [diff] [blame] | 61 | static std::unique_ptr<ChromeMetricsServiceClient> Create( |
calvimei | 5b30e0d | 2016-08-17 21:24:33 | [diff] [blame] | 62 | metrics::MetricsStateManager* state_manager); |
[email protected] | 037642f | 2014-05-29 20:40:50 | [diff] [blame] | 63 | |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 64 | // Registers local state prefs used by this class. |
| 65 | static void RegisterPrefs(PrefRegistrySimple* registry); |
| 66 | |
[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 67 | // metrics::MetricsServiceClient: |
blundell | fecea528d | 2015-10-21 10:10:22 | [diff] [blame] | 68 | metrics::MetricsService* GetMetricsService() override; |
holte | 7b74c62 | 2017-01-23 23:13:07 | [diff] [blame] | 69 | ukm::UkmService* GetUkmService() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 70 | void SetMetricsClientId(const std::string& client_id) override; |
avi | 6846aef | 2015-12-26 01:09:38 | [diff] [blame] | 71 | int32_t GetProduct() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 72 | std::string GetApplicationLocale() override; |
| 73 | bool GetBrand(std::string* brand_code) override; |
| 74 | metrics::SystemProfileProto::Channel GetChannel() override; |
| 75 | std::string GetVersionString() override; |
manzagop | a5d6688d | 2016-10-25 20:16:03 | [diff] [blame] | 76 | void OnEnvironmentUpdate(std::string* serialized_environment) override; |
manzagop | 14aff5d | 2016-11-23 17:27:00 | [diff] [blame] | 77 | void OnLogCleanShutdown() override; |
isherman | b670568 | 2015-08-29 00:01:00 | [diff] [blame] | 78 | void InitializeSystemProfileMetrics( |
| 79 | const base::Closure& done_callback) override; |
| 80 | void CollectFinalMetricsForLog(const base::Closure& done_callback) override; |
dcheng | 1edb03a | 2016-04-14 17:20:29 | [diff] [blame] | 81 | std::unique_ptr<metrics::MetricsLogUploader> CreateUploader( |
holte | 4ae63f5 | 2017-03-08 00:25:08 | [diff] [blame^] | 82 | base::StringPiece server_url, |
| 83 | base::StringPiece mime_type, |
rkaplow | 9c42082 | 2017-02-24 15:29:57 | [diff] [blame] | 84 | metrics::MetricsLogUploader::MetricServiceType service_type, |
mostynb | 2b52d1db | 2014-10-07 02:47:17 | [diff] [blame] | 85 | const base::Callback<void(int)>& on_upload_complete) override; |
gunsch | 7cbdcb2 | 2015-03-13 17:02:05 | [diff] [blame] | 86 | base::TimeDelta GetStandardUploadInterval() override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 87 | base::string16 GetRegistryBackupKey() override; |
blundell | fecea528d | 2015-10-21 10:10:22 | [diff] [blame] | 88 | void OnPluginLoadingError(const base::FilePath& plugin_path) override; |
jwd | 421086f | 2016-03-21 14:40:42 | [diff] [blame] | 89 | bool IsReportingPolicyManaged() override; |
gayane | daaf3a0 | 2016-06-15 16:30:21 | [diff] [blame] | 90 | metrics::EnableMetricsDefault GetMetricsReportingDefaultState() override; |
gayane | 0b46091c | 2016-04-07 21:01:05 | [diff] [blame] | 91 | bool IsUMACellularUploadLogicEnabled() override; |
holte | 08137d79 | 2017-02-15 21:43:56 | [diff] [blame] | 92 | bool IsHistorySyncEnabledOnAllProfiles() override; |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 93 | |
holte | 1334c0aa | 2017-02-09 22:52:41 | [diff] [blame] | 94 | // ukm::HistoryDeleteObserver: |
holte | 7b74c62 | 2017-01-23 23:13:07 | [diff] [blame] | 95 | void OnHistoryDeleted() override; |
| 96 | |
holte | 1334c0aa | 2017-02-09 22:52:41 | [diff] [blame] | 97 | // ukm::SyncDisableObserver: |
| 98 | void OnSyncPrefsChanged(bool must_purge) override; |
| 99 | |
bcwhite | 374d5fe | 2016-05-20 17:03:24 | [diff] [blame] | 100 | // Persistent browser metrics need to be persisted somewhere. This constant |
| 101 | // provides a known string to be used for both the allocator's internal name |
| 102 | // and for a file on disk (relative to chrome::DIR_USER_DATA) to which they |
| 103 | // can be saved. |
| 104 | static const char kBrowserMetricsName[]; |
| 105 | |
[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 106 | private: |
[email protected] | 037642f | 2014-05-29 20:40:50 | [diff] [blame] | 107 | explicit ChromeMetricsServiceClient( |
| 108 | metrics::MetricsStateManager* state_manager); |
| 109 | |
[email protected] | 51994b2 | 2014-05-30 13:24:21 | [diff] [blame] | 110 | // Completes the two-phase initialization of ChromeMetricsServiceClient. |
| 111 | void Initialize(); |
| 112 | |
rkaplow | b8d63f43 | 2017-02-06 19:00:42 | [diff] [blame] | 113 | // Registers providers to the MetricsService. These provide data from |
| 114 | // alternate sources. |
| 115 | void RegisterMetricsServiceProviders(); |
| 116 | |
| 117 | // Registers providers to the UkmService. These provide data from alternate |
| 118 | // sources. |
| 119 | void RegisterUKMProviders(); |
| 120 | |
huangs | e0fa6fd | 2016-11-04 20:41:10 | [diff] [blame] | 121 | // Callback to chain init tasks: Pops and executes the next init task from |
| 122 | // |initialize_task_queue_|, then passes itself as callback for each init task |
| 123 | // to call upon completion. |
| 124 | void OnInitNextTask(); |
manzagop | f232266 | 2016-09-27 11:39:59 | [diff] [blame] | 125 | |
isherman | 213b47c | 2015-08-28 08:20:46 | [diff] [blame] | 126 | // Returns true iff profiler data should be included in the next metrics log. |
| 127 | // NOTE: This method is probabilistic and also updates internal state as a |
| 128 | // side-effect when called, so it should only be called once per log. |
| 129 | bool ShouldIncludeProfilerDataInLog(); |
| 130 | |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 131 | // TrackingSynchronizerObserver: |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 132 | void ReceivedProfilerData( |
vadimt | e2de473 | 2015-04-27 21:43:02 | [diff] [blame] | 133 | const metrics::ProfilerDataAttributes& attributes, |
vadimt | 379d7fe | 2015-04-01 00:09:35 | [diff] [blame] | 134 | const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase, |
vadimt | 379d7fe | 2015-04-01 00:09:35 | [diff] [blame] | 135 | const metrics::ProfilerEvents& past_profiler_events) override; |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 136 | void FinishedReceivingProfilerData() override; |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 137 | |
[email protected] | 4b4892b | 2014-05-22 15:06:15 | [diff] [blame] | 138 | // Callbacks for various stages of final log info collection. Do not call |
| 139 | // these directly. |
isherman | fcf4639e8 | 2015-08-26 00:33:49 | [diff] [blame] | 140 | void CollectFinalHistograms(); |
[email protected] | 4b4892b | 2014-05-22 15:06:15 | [diff] [blame] | 141 | void OnMemoryDetailCollectionDone(); |
| 142 | void OnHistogramSynchronizationDone(); |
| 143 | |
[email protected] | daed87e | 2014-05-22 19:41:22 | [diff] [blame] | 144 | // Records metrics about the switches present on the command line. |
| 145 | void RecordCommandLineMetrics(); |
| 146 | |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 147 | // Registers |this| as an observer for notifications which indicate that a |
| 148 | // user is performing work. This is useful to allow some features to sleep, |
| 149 | // until the machine becomes active, such as precluding UMA uploads unless |
| 150 | // there was recent activity. |
| 151 | void RegisterForNotifications(); |
| 152 | |
holte | 1334c0aa | 2017-02-09 22:52:41 | [diff] [blame] | 153 | // Call to listen for events on the selected profile's services. |
| 154 | void RegisterForProfileEvents(Profile* profile); |
holte | 7b74c62 | 2017-01-23 23:13:07 | [diff] [blame] | 155 | |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 156 | // content::NotificationObserver: |
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 157 | void Observe(int type, |
| 158 | const content::NotificationSource& source, |
| 159 | const content::NotificationDetails& details) override; |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 160 | |
blundell | 26b9524 | 2015-08-17 10:29:24 | [diff] [blame] | 161 | // Called when a URL is opened from the Omnibox. |
| 162 | void OnURLOpenedFromOmnibox(OmniboxLog* log); |
| 163 | |
[email protected] | e2481a70 | 2014-05-23 21:06:50 | [diff] [blame] | 164 | #if defined(OS_WIN) |
| 165 | // Counts (and removes) the browser crash dump attempt signals left behind by |
| 166 | // any previous browser processes which generated a crash dump. |
| 167 | void CountBrowserCrashDumpAttempts(); |
| 168 | #endif // OS_WIN |
| 169 | |
[email protected] | 4b4892b | 2014-05-22 15:06:15 | [diff] [blame] | 170 | base::ThreadChecker thread_checker_; |
| 171 | |
[email protected] | 51994b2 | 2014-05-30 13:24:21 | [diff] [blame] | 172 | // Weak pointer to the MetricsStateManager. |
| 173 | metrics::MetricsStateManager* metrics_state_manager_; |
| 174 | |
[email protected] | 037642f | 2014-05-29 20:40:50 | [diff] [blame] | 175 | // The MetricsService that |this| is a client of. |
dcheng | 1edb03a | 2016-04-14 17:20:29 | [diff] [blame] | 176 | std::unique_ptr<metrics::MetricsService> metrics_service_; |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 177 | |
holte | 7b74c62 | 2017-01-23 23:13:07 | [diff] [blame] | 178 | // The UkmService that |this| is a client of. |
| 179 | std::unique_ptr<ukm::UkmService> ukm_service_; |
| 180 | |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 181 | content::NotificationRegistrar registrar_; |
[email protected] | d7ea39e | 2014-05-22 03:59:18 | [diff] [blame] | 182 | |
mlamouri | ba00ad1 | 2016-01-16 15:06:08 | [diff] [blame] | 183 | #if defined(OS_CHROMEOS) |
[email protected] | 51994b2 | 2014-05-30 13:24:21 | [diff] [blame] | 184 | // On ChromeOS, holds a weak pointer to the ChromeOSMetricsProvider instance |
| 185 | // that has been registered with MetricsService. On other platforms, is NULL. |
| 186 | ChromeOSMetricsProvider* chromeos_metrics_provider_; |
mlamouri | ba00ad1 | 2016-01-16 15:06:08 | [diff] [blame] | 187 | #endif |
[email protected] | 51994b2 | 2014-05-30 13:24:21 | [diff] [blame] | 188 | |
huangs | e0fa6fd | 2016-11-04 20:41:10 | [diff] [blame] | 189 | // A queue of tasks for initial metrics gathering. These may be asynchronous |
| 190 | // or synchronous. |
| 191 | std::deque<base::Closure> initialize_task_queue_; |
| 192 | |
isherman | b670568 | 2015-08-29 00:01:00 | [diff] [blame] | 193 | // Saved callback received from CollectFinalMetricsForLog(). |
[email protected] | 4b4892b | 2014-05-22 15:06:15 | [diff] [blame] | 194 | base::Closure collect_final_metrics_done_callback_; |
| 195 | |
| 196 | // Indicates that collect final metrics step is running. |
| 197 | bool waiting_for_collect_final_metrics_step_; |
| 198 | |
| 199 | // Number of async histogram fetch requests in progress. |
| 200 | int num_async_histogram_fetches_in_progress_; |
| 201 | |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 202 | // The ProfilerMetricsProvider instance that was registered with |
| 203 | // MetricsService. Has the same lifetime as |metrics_service_|. |
gunsch | 840bc41 | 2014-09-18 19:38:06 | [diff] [blame] | 204 | metrics::ProfilerMetricsProvider* profiler_metrics_provider_; |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 205 | |
brettw | 4b46108 | 2016-11-19 18:55:16 | [diff] [blame] | 206 | #if BUILDFLAG(ENABLE_PLUGINS) |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 207 | // The PluginMetricsProvider instance that was registered with |
| 208 | // MetricsService. Has the same lifetime as |metrics_service_|. |
| 209 | PluginMetricsProvider* plugin_metrics_provider_; |
| 210 | #endif |
| 211 | |
| 212 | #if defined(OS_WIN) |
| 213 | // The GoogleUpdateMetricsProviderWin instance that was registered with |
| 214 | // MetricsService. Has the same lifetime as |metrics_service_|. |
| 215 | GoogleUpdateMetricsProviderWin* google_update_metrics_provider_; |
wfh | c768983fa | 2016-06-08 16:40:33 | [diff] [blame] | 216 | |
manzagop | f232266 | 2016-09-27 11:39:59 | [diff] [blame] | 217 | // The WatcherMetricsProviderWin instance that was registered with |
| 218 | // MetricsService. Has the same lifetime as |metrics_service_|. |
| 219 | browser_watcher::WatcherMetricsProviderWin* watcher_metrics_provider_; |
| 220 | |
wfh | c768983fa | 2016-06-08 16:40:33 | [diff] [blame] | 221 | // The AntiVirusMetricsProvider instance that was registered with |
| 222 | // MetricsService. Has the same lifetime as |metrics_service_|. |
| 223 | AntiVirusMetricsProvider* antivirus_metrics_provider_; |
[email protected] | 4a55a71 | 2014-06-08 16:50:34 | [diff] [blame] | 224 | #endif |
| 225 | |
dbeam | 64c3784 | 2015-03-18 02:23:35 | [diff] [blame] | 226 | // The DriveMetricsProvider instance that was registered with MetricsService. |
| 227 | // Has the same lifetime as |metrics_service_|. |
blundell | b5c6b5a | 2015-07-30 20:18:30 | [diff] [blame] | 228 | metrics::DriveMetricsProvider* drive_metrics_provider_; |
dbeam | 64c3784 | 2015-03-18 02:23:35 | [diff] [blame] | 229 | |
[email protected] | 8a5b2da | 2014-07-07 10:56:51 | [diff] [blame] | 230 | // The MemoryGrowthTracker instance that tracks memory usage growth in |
| 231 | // MemoryDetails. |
| 232 | MemoryGrowthTracker memory_growth_tracker_; |
| 233 | |
gunsch | 7cbdcb2 | 2015-03-13 17:02:05 | [diff] [blame] | 234 | // Callback to determine whether or not a cellular network is currently being |
| 235 | // used. |
| 236 | base::Callback<void(bool*)> cellular_callback_; |
| 237 | |
vadimt | e2de473 | 2015-04-27 21:43:02 | [diff] [blame] | 238 | // Time of this object's creation. |
| 239 | const base::TimeTicks start_time_; |
| 240 | |
blundell | 26b9524 | 2015-08-17 10:29:24 | [diff] [blame] | 241 | // Subscription for receiving callbacks that a URL was opened from the |
| 242 | // omnibox. |
dcheng | 1edb03a | 2016-04-14 17:20:29 | [diff] [blame] | 243 | std::unique_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> |
blundell | 26b9524 | 2015-08-17 10:29:24 | [diff] [blame] | 244 | omnibox_url_opened_subscription_; |
| 245 | |
isherman | 213b47c | 2015-08-28 08:20:46 | [diff] [blame] | 246 | // Whether this client has already uploaded profiler data during this session. |
| 247 | // Profiler data is uploaded at most once per session. |
| 248 | bool has_uploaded_profiler_data_; |
| 249 | |
[email protected] | 4b4892b | 2014-05-22 15:06:15 | [diff] [blame] | 250 | base::WeakPtrFactory<ChromeMetricsServiceClient> weak_ptr_factory_; |
| 251 | |
[email protected] | 5bdaa2d | 2014-05-19 14:59:51 | [diff] [blame] | 252 | DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClient); |
| 253 | }; |
| 254 | |
| 255 | #endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |