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

Side by Side Diff: chrome/browser/metrics/plugin_metrics_provider.cc

Issue 1067733006: Add extra parameter to BrowserChildProcessCrashed to pass the exit_code at time of crash/termination (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: code review comments Created 5 years, 7 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 | « chrome/browser/metrics/plugin_metrics_provider.h ('k') | chrome/chrome_browser.gypi » ('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 #include "chrome/browser/metrics/plugin_metrics_provider.h" 5 #include "chrome/browser/metrics/plugin_metrics_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 return child_process_stats_buffer_[child_name]; 346 return child_process_stats_buffer_[child_name];
347 } 347 }
348 348
349 void PluginMetricsProvider::BrowserChildProcessHostConnected( 349 void PluginMetricsProvider::BrowserChildProcessHostConnected(
350 const content::ChildProcessData& data) { 350 const content::ChildProcessData& data) {
351 GetChildProcessStats(data).process_launches++; 351 GetChildProcessStats(data).process_launches++;
352 RecordCurrentStateWithDelay(kRecordStateDelayMs); 352 RecordCurrentStateWithDelay(kRecordStateDelayMs);
353 } 353 }
354 354
355 void PluginMetricsProvider::BrowserChildProcessCrashed( 355 void PluginMetricsProvider::BrowserChildProcessCrashed(
356 const content::ChildProcessData& data) { 356 const content::ChildProcessData& data,
357 int exit_code) {
357 GetChildProcessStats(data).process_crashes++; 358 GetChildProcessStats(data).process_crashes++;
358 RecordCurrentStateWithDelay(kRecordStateDelayMs); 359 RecordCurrentStateWithDelay(kRecordStateDelayMs);
359 } 360 }
360 361
361 void PluginMetricsProvider::BrowserChildProcessInstanceCreated( 362 void PluginMetricsProvider::BrowserChildProcessInstanceCreated(
362 const content::ChildProcessData& data) { 363 const content::ChildProcessData& data) {
363 GetChildProcessStats(data).instances++; 364 GetChildProcessStats(data).instances++;
364 RecordCurrentStateWithDelay(kRecordStateDelayMs); 365 RecordCurrentStateWithDelay(kRecordStateDelayMs);
365 } 366 }
366 367
(...skipping 10 matching lines...) Expand all
377 } 378 }
378 379
379 bool PluginMetricsProvider::RecordCurrentStateIfPending() { 380 bool PluginMetricsProvider::RecordCurrentStateIfPending() {
380 if (!weak_ptr_factory_.HasWeakPtrs()) 381 if (!weak_ptr_factory_.HasWeakPtrs())
381 return false; 382 return false;
382 383
383 weak_ptr_factory_.InvalidateWeakPtrs(); 384 weak_ptr_factory_.InvalidateWeakPtrs();
384 RecordCurrentState(); 385 RecordCurrentState();
385 return true; 386 return true;
386 } 387 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/plugin_metrics_provider.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698