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

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

Issue 2917483002: Fix Ozone build (Closed)
Patch Set: Review comment changes Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 if (translated_glibc_minor_version >= UMA_LINUX_GLIBC_2_11) { 276 if (translated_glibc_minor_version >= UMA_LINUX_GLIBC_2_11) {
277 glibc_version_result = 277 glibc_version_result =
278 static_cast<UMALinuxGlibcVersion>(translated_glibc_minor_version); 278 static_cast<UMALinuxGlibcVersion>(translated_glibc_minor_version);
279 } 279 }
280 } 280 }
281 } 281 }
282 UMA_HISTOGRAM_SPARSE_SLOWLY("Linux.GlibcVersion", glibc_version_result); 282 UMA_HISTOGRAM_SPARSE_SLOWLY("Linux.GlibcVersion", glibc_version_result);
283 #endif 283 #endif
284 } 284 }
285 285
286 #if defined(USE_X11) && !defined(OS_CHROMEOS) 286 #if defined(USE_X11) && !defined(OS_CHROMEOS)
Lei Zhang 2017/06/01 19:11:32 This should match line 467.
287 UMALinuxWindowManager GetLinuxWindowManager() { 287 UMALinuxWindowManager GetLinuxWindowManager() {
288 switch (ui::GuessWindowManager()) { 288 switch (ui::GuessWindowManager()) {
289 case ui::WM_OTHER: 289 case ui::WM_OTHER:
290 return UMA_LINUX_WINDOW_MANAGER_OTHER; 290 return UMA_LINUX_WINDOW_MANAGER_OTHER;
291 case ui::WM_UNNAMED: 291 case ui::WM_UNNAMED:
292 return UMA_LINUX_WINDOW_MANAGER_UNNAMED; 292 return UMA_LINUX_WINDOW_MANAGER_UNNAMED;
293 case ui::WM_AWESOME: 293 case ui::WM_AWESOME:
294 return UMA_LINUX_WINDOW_MANAGER_AWESOME; 294 return UMA_LINUX_WINDOW_MANAGER_AWESOME;
295 case ui::WM_BLACKBOX: 295 case ui::WM_BLACKBOX:
296 return UMA_LINUX_WINDOW_MANAGER_BLACKBOX; 296 return UMA_LINUX_WINDOW_MANAGER_BLACKBOX;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(USE_X11) && !defined(OS_CHROMEOS)
468 UMA_HISTOGRAM_ENUMERATION("Linux.WindowManager", 468 UMA_HISTOGRAM_ENUMERATION("Linux.WindowManager", GetLinuxWindowManager(),
469 GetLinuxWindowManager(),
470 UMA_LINUX_WINDOW_MANAGER_COUNT); 469 UMA_LINUX_WINDOW_MANAGER_COUNT);
470 #endif
471 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
471 base::PostTaskWithTraits(FROM_HERE, 472 base::PostTaskWithTraits(FROM_HERE,
472 {base::MayBlock(), base::TaskPriority::BACKGROUND}, 473 {base::MayBlock(), base::TaskPriority::BACKGROUND},
473 base::BindOnce(&RecordLinuxDistro)); 474 base::BindOnce(&RecordLinuxDistro));
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()) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698