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

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

Issue 1000203007: Set a "metrics_client_id" crash key instead of "guid" on Mac OS X (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove sentencelet Created 5 years, 9 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 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 AndroidMetricsProvider::RegisterPrefs(registry); 173 AndroidMetricsProvider::RegisterPrefs(registry);
174 #endif // defined(OS_ANDROID) 174 #endif // defined(OS_ANDROID)
175 175
176 #if defined(ENABLE_PLUGINS) 176 #if defined(ENABLE_PLUGINS)
177 PluginMetricsProvider::RegisterPrefs(registry); 177 PluginMetricsProvider::RegisterPrefs(registry);
178 #endif // defined(ENABLE_PLUGINS) 178 #endif // defined(ENABLE_PLUGINS)
179 } 179 }
180 180
181 void ChromeMetricsServiceClient::SetMetricsClientId( 181 void ChromeMetricsServiceClient::SetMetricsClientId(
182 const std::string& client_id) { 182 const std::string& client_id) {
183 crash_keys::SetCrashClientIdFromGUID(client_id); 183 crash_keys::SetMetricsClientIdFromGUID(client_id);
184 }
185
186 void ChromeMetricsServiceClient::OnRecordingDisabled() {
187 crash_keys::ClearMetricsClientId();
184 } 188 }
185 189
186 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() { 190 bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() {
187 return chrome::IsOffTheRecordSessionActive(); 191 return chrome::IsOffTheRecordSessionActive();
188 } 192 }
189 193
190 int32 ChromeMetricsServiceClient::GetProduct() { 194 int32 ChromeMetricsServiceClient::GetProduct() {
191 return metrics::ChromeUserMetricsExtension::CHROME; 195 return metrics::ChromeUserMetricsExtension::CHROME;
192 } 196 }
193 197
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 // Capture the histogram samples. 599 // Capture the histogram samples.
596 if (dumps_with_crash != 0) 600 if (dumps_with_crash != 0)
597 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); 601 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash);
598 if (dumps_with_no_crash != 0) 602 if (dumps_with_no_crash != 0)
599 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); 603 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash);
600 int total_dumps = dumps_with_crash + dumps_with_no_crash; 604 int total_dumps = dumps_with_crash + dumps_with_no_crash;
601 if (total_dumps != 0) 605 if (total_dumps != 0)
602 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); 606 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps);
603 } 607 }
604 #endif // defined(OS_WIN) 608 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.h ('k') | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698