Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.h" | 5 #include "ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.h" |
| 6 | 6 |
| 7 #import "ios/web/public/web_state/web_state.h" | |
| 8 | |
| 7 IOSChromeStabilityMetricsProvider::IOSChromeStabilityMetricsProvider( | 9 IOSChromeStabilityMetricsProvider::IOSChromeStabilityMetricsProvider( |
| 8 PrefService* local_state) | 10 PrefService* local_state) |
| 9 : helper_(local_state), recording_enabled_(false) {} | 11 : helper_(local_state), recording_enabled_(false) {} |
| 10 | 12 |
| 11 IOSChromeStabilityMetricsProvider::~IOSChromeStabilityMetricsProvider() {} | 13 IOSChromeStabilityMetricsProvider::~IOSChromeStabilityMetricsProvider() {} |
| 12 | 14 |
| 13 void IOSChromeStabilityMetricsProvider::OnRecordingEnabled() { | 15 void IOSChromeStabilityMetricsProvider::OnRecordingEnabled() { |
| 14 recording_enabled_ = true; | 16 recording_enabled_ = true; |
| 15 } | 17 } |
| 16 | 18 |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 40 dummy_termination_code); | 42 dummy_termination_code); |
| 41 } | 43 } |
| 42 | 44 |
| 43 void IOSChromeStabilityMetricsProvider::WebStateDidStartLoading( | 45 void IOSChromeStabilityMetricsProvider::WebStateDidStartLoading( |
| 44 web::WebState* web_state) { | 46 web::WebState* web_state) { |
| 45 if (!recording_enabled_) | 47 if (!recording_enabled_) |
| 46 return; | 48 return; |
| 47 | 49 |
| 48 helper_.LogLoadStarted(); | 50 helper_.LogLoadStarted(); |
| 49 } | 51 } |
| 52 | |
| 53 void IOSChromeStabilityMetricsProvider::RenderProcessGone( | |
| 54 web::WebState* web_state) { | |
| 55 if (!recording_enabled_) | |
| 56 return; | |
| 57 LogRendererCrash(); | |
| 58 // TODO(crbug.com/685649): Logs web_state->GetLastCommittedURL(). | |
|
Eugene But (OOO till 7-30)
2017/03/24 15:37:50
Really nit: s/Logs/Log
pkl (ping after 24h if needed)
2017/03/27 15:32:47
Expanded the comment rendering this irrelevant.
| |
| 59 } | |
| OLD | NEW |