| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 // Check if all expected requests finished. | 443 // Check if all expected requests finished. |
| 444 if (--num_async_histogram_fetches_in_progress_ > 0) | 444 if (--num_async_histogram_fetches_in_progress_ > 0) |
| 445 return; | 445 return; |
| 446 | 446 |
| 447 waiting_for_collect_final_metrics_step_ = false; | 447 waiting_for_collect_final_metrics_step_ = false; |
| 448 collect_final_metrics_done_callback_.Run(); | 448 collect_final_metrics_done_callback_.Run(); |
| 449 } | 449 } |
| 450 | 450 |
| 451 void ChromeMetricsServiceClient::RecordCommandLineMetrics() { | 451 void ChromeMetricsServiceClient::RecordCommandLineMetrics() { |
| 452 // Get stats on use of command line. | 452 // Get stats on use of command line. |
| 453 const CommandLine* command_line(CommandLine::ForCurrentProcess()); | 453 const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess()); |
| 454 size_t common_commands = 0; | 454 size_t common_commands = 0; |
| 455 if (command_line->HasSwitch(switches::kUserDataDir)) { | 455 if (command_line->HasSwitch(switches::kUserDataDir)) { |
| 456 ++common_commands; | 456 ++common_commands; |
| 457 UMA_HISTOGRAM_COUNTS_100("Chrome.CommandLineDatDirCount", 1); | 457 UMA_HISTOGRAM_COUNTS_100("Chrome.CommandLineDatDirCount", 1); |
| 458 } | 458 } |
| 459 | 459 |
| 460 if (command_line->HasSwitch(switches::kApp)) { | 460 if (command_line->HasSwitch(switches::kApp)) { |
| 461 ++common_commands; | 461 ++common_commands; |
| 462 UMA_HISTOGRAM_COUNTS_100("Chrome.CommandLineAppModeCount", 1); | 462 UMA_HISTOGRAM_COUNTS_100("Chrome.CommandLineAppModeCount", 1); |
| 463 } | 463 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 // Capture the histogram samples. | 559 // Capture the histogram samples. |
| 560 if (dumps_with_crash != 0) | 560 if (dumps_with_crash != 0) |
| 561 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); | 561 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithCrash", dumps_with_crash); |
| 562 if (dumps_with_no_crash != 0) | 562 if (dumps_with_no_crash != 0) |
| 563 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); | 563 UMA_HISTOGRAM_COUNTS("Chrome.BrowserDumpsWithNoCrash", dumps_with_no_crash); |
| 564 int total_dumps = dumps_with_crash + dumps_with_no_crash; | 564 int total_dumps = dumps_with_crash + dumps_with_no_crash; |
| 565 if (total_dumps != 0) | 565 if (total_dumps != 0) |
| 566 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); | 566 UMA_HISTOGRAM_COUNTS("Chrome.BrowserCrashDumpAttempts", total_dumps); |
| 567 } | 567 } |
| 568 #endif // defined(OS_WIN) | 568 #endif // defined(OS_WIN) |
| OLD | NEW |