| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "components/browser_watcher/watcher_metrics_provider_win.h" | 5 #include "components/browser_watcher/watcher_metrics_provider_win.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 if (res != ERROR_FILE_NOT_FOUND && res != ERROR_SUCCESS) | 184 if (res != ERROR_FILE_NOT_FOUND && res != ERROR_SUCCESS) |
| 185 DVLOG(1) << "Failed to delete exit code key " << registry_path; | 185 DVLOG(1) << "Failed to delete exit code key " << registry_path; |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace | 188 } // namespace |
| 189 | 189 |
| 190 const char WatcherMetricsProviderWin::kBrowserExitCodeHistogramName[] = | 190 const char WatcherMetricsProviderWin::kBrowserExitCodeHistogramName[] = |
| 191 "Stability.BrowserExitCodes"; | 191 "Stability.BrowserExitCodes"; |
| 192 | 192 |
| 193 WatcherMetricsProviderWin::WatcherMetricsProviderWin( | 193 WatcherMetricsProviderWin::WatcherMetricsProviderWin( |
| 194 const base::char16* registry_path, | 194 const base::string16& registry_path, |
| 195 base::TaskRunner* cleanup_io_task_runner) | 195 base::TaskRunner* cleanup_io_task_runner) |
| 196 : recording_enabled_(false), | 196 : recording_enabled_(false), |
| 197 cleanup_scheduled_(false), | 197 cleanup_scheduled_(false), |
| 198 registry_path_(registry_path), | 198 registry_path_(registry_path), |
| 199 cleanup_io_task_runner_(cleanup_io_task_runner) { | 199 cleanup_io_task_runner_(cleanup_io_task_runner) { |
| 200 DCHECK(cleanup_io_task_runner_); | 200 DCHECK(cleanup_io_task_runner_); |
| 201 } | 201 } |
| 202 | 202 |
| 203 WatcherMetricsProviderWin::~WatcherMetricsProviderWin() { | 203 WatcherMetricsProviderWin::~WatcherMetricsProviderWin() { |
| 204 } | 204 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 225 // user account, there's a small race that will double-report the exit codes | 225 // user account, there's a small race that will double-report the exit codes |
| 226 // from both/multiple instances. This ought to be vanishingly rare and will | 226 // from both/multiple instances. This ought to be vanishingly rare and will |
| 227 // only manifest as low-level "random" noise. To work around this it would be | 227 // only manifest as low-level "random" noise. To work around this it would be |
| 228 // necessary to implement some form of global locking, which is not worth it | 228 // necessary to implement some form of global locking, which is not worth it |
| 229 // here. | 229 // here. |
| 230 RecordExitCodes(registry_path_); | 230 RecordExitCodes(registry_path_); |
| 231 DeleteExitFunnels(registry_path_); | 231 DeleteExitFunnels(registry_path_); |
| 232 } | 232 } |
| 233 | 233 |
| 234 } // namespace browser_watcher | 234 } // namespace browser_watcher |
| OLD | NEW |