OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_browser_main_extra_parts_metrics.h" | 5 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
457 "Enabled" | 457 "Enabled" |
458 #else | 458 #else |
459 "Disabled" | 459 "Disabled" |
460 #endif | 460 #endif |
461 ); | 461 ); |
462 #endif | 462 #endif |
463 } | 463 } |
464 | 464 |
465 void ChromeBrowserMainExtraPartsMetrics::PostBrowserStart() { | 465 void ChromeBrowserMainExtraPartsMetrics::PostBrowserStart() { |
466 RecordLinuxGlibcVersion(); | 466 RecordLinuxGlibcVersion(); |
467 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 467 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
468 UMA_HISTOGRAM_ENUMERATION("Linux.WindowManager", | |
469 GetLinuxWindowManager(), | |
470 UMA_LINUX_WINDOW_MANAGER_COUNT); | |
471 base::PostTaskWithTraits(FROM_HERE, | 468 base::PostTaskWithTraits(FROM_HERE, |
472 {base::MayBlock(), base::TaskPriority::BACKGROUND}, | 469 {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
473 base::BindOnce(&RecordLinuxDistro)); | 470 base::BindOnce(&RecordLinuxDistro)); |
471 #if defined(USE_X11) | |
Tom Anderson
2017/05/30 22:57:07
GetLinuxWindowManager above is guarded with "defin
timbrown
2017/05/30 23:03:58
Sure. Done.
| |
472 UMA_HISTOGRAM_ENUMERATION("Linux.WindowManager", GetLinuxWindowManager(), | |
473 UMA_LINUX_WINDOW_MANAGER_COUNT); | |
474 #endif | |
474 #endif | 475 #endif |
475 | 476 |
476 #if defined(USE_OZONE) || defined(USE_X11) | 477 #if defined(USE_OZONE) || defined(USE_X11) |
477 // The touch event state for X11 and Ozone based event sub-systems are based | 478 // The touch event state for X11 and Ozone based event sub-systems are based |
478 // on device scans that happen asynchronously. So we may need to attach an | 479 // on device scans that happen asynchronously. So we may need to attach an |
479 // observer to wait until these scans complete. | 480 // observer to wait until these scans complete. |
480 if (ui::InputDeviceManager::GetInstance()->AreDeviceListsComplete()) { | 481 if (ui::InputDeviceManager::GetInstance()->AreDeviceListsComplete()) { |
481 RecordTouchEventState(); | 482 RecordTouchEventState(); |
482 } else { | 483 } else { |
483 input_device_event_observer_.reset( | 484 input_device_event_observer_.reset( |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
536 } | 537 } |
537 } | 538 } |
538 | 539 |
539 namespace chrome { | 540 namespace chrome { |
540 | 541 |
541 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { | 542 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { |
542 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); | 543 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); |
543 } | 544 } |
544 | 545 |
545 } // namespace chrome | 546 } // namespace chrome |
OLD | NEW |