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

Side by Side Diff: ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.mm

Issue 2670743002: Track renderer crash detected on WebState via GlobalWebStateObserver (Closed)
Patch Set: comment Created 3 years, 8 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 #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
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(
Eugene But (OOO till 7-30) 2017/03/27 16:56:26 I gave some more thoughts about the problem, so so
pkl (ping after 24h if needed) 2017/04/13 22:29:40 Let's discuss this in person.
pkl (ping after 24h if needed) 2017/04/14 21:38:53 Discussed offline with eugenebut@. This CL should
54 web::WebState* web_state) {
55 if (!recording_enabled_)
56 return;
57 LogRendererCrash();
58 // TODO(crbug.com/685649): web_state->GetLastCommittedURL() is likely the URL
59 // that caused a renderer crash and can be logged here.
60 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.cc ('k') | ios/chrome/browser/tabs/tab.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698