OLD | NEW |
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/chrome_metrics_service_client.h" | 5 #include "chrome/browser/metrics/chrome_metrics_service_client.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // Will run the provided task after finished. | 99 // Will run the provided task after finished. |
100 class MetricsMemoryDetails : public MemoryDetails { | 100 class MetricsMemoryDetails : public MemoryDetails { |
101 public: | 101 public: |
102 MetricsMemoryDetails( | 102 MetricsMemoryDetails( |
103 const base::Closure& callback, | 103 const base::Closure& callback, |
104 MemoryGrowthTracker* memory_growth_tracker) | 104 MemoryGrowthTracker* memory_growth_tracker) |
105 : callback_(callback) { | 105 : callback_(callback) { |
106 SetMemoryGrowthTracker(memory_growth_tracker); | 106 SetMemoryGrowthTracker(memory_growth_tracker); |
107 } | 107 } |
108 | 108 |
109 virtual void OnDetailsAvailable() OVERRIDE { | 109 virtual void OnDetailsAvailable() override { |
110 base::MessageLoop::current()->PostTask(FROM_HERE, callback_); | 110 base::MessageLoop::current()->PostTask(FROM_HERE, callback_); |
111 } | 111 } |
112 | 112 |
113 private: | 113 private: |
114 virtual ~MetricsMemoryDetails() {} | 114 virtual ~MetricsMemoryDetails() {} |
115 | 115 |
116 base::Closure callback_; | 116 base::Closure callback_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails); | 118 DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails); |
119 }; | 119 }; |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 // Capture the histogram samples. | 558 // Capture the histogram samples. |
559 if (dumps_with_crash != 0) | 559 if (dumps_with_crash != 0) |
560 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); | 560 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); |
561 if (dumps_with_no_crash != 0) | 561 if (dumps_with_no_crash != 0) |
562 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); | 562 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); |
563 int total_dumps = dumps_with_crash + dumps_with_no_crash; | 563 int total_dumps = dumps_with_crash + dumps_with_no_crash; |
564 if (total_dumps != 0) | 564 if (total_dumps != 0) |
565 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); | 565 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); |
566 } | 566 } |
567 #endif // defined(OS_WIN) | 567 #endif // defined(OS_WIN) |
OLD | NEW |