| 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/shell_integration.h" | 23 #include "chrome/browser/shell_integration.h" |
| 24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 25 #include "ui/base/touch/touch_device.h" | 25 #include "ui/base/touch/touch_device.h" |
| 26 #include "ui/base/ui_base_switches.h" | 26 #include "ui/base/ui_base_switches.h" |
| 27 #include "ui/events/event_switches.h" | 27 #include "ui/events/event_switches.h" |
| 28 | 28 |
| 29 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 29 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 30 #include <gnu/libc-version.h> | 30 #include <gnu/libc-version.h> |
| 31 | 31 |
| 32 #include "base/version.h" | 32 #include "base/version.h" |
| 33 #if defined(USE_X11) |
| 33 #include "ui/base/x/x11_util.h" | 34 #include "ui/base/x/x11_util.h" |
| 35 #endif |
| 34 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) | 36 #endif // defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 35 | 37 |
| 36 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
| 37 #include "chrome/installer/util/google_update_settings.h" | 39 #include "chrome/installer/util/google_update_settings.h" |
| 38 #endif // defined(OS_WIN) | 40 #endif // defined(OS_WIN) |
| 39 | 41 |
| 40 namespace { | 42 namespace { |
| 41 | 43 |
| 42 enum UMALinuxGlibcVersion { | 44 enum UMALinuxGlibcVersion { |
| 43 UMA_LINUX_GLIBC_NOT_PARSEABLE, | 45 UMA_LINUX_GLIBC_NOT_PARSEABLE, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 static_cast<UMALinuxGlibcVersion>(translated_glibc_minor_version); | 128 static_cast<UMALinuxGlibcVersion>(translated_glibc_minor_version); |
| 127 } | 129 } |
| 128 } | 130 } |
| 129 } | 131 } |
| 130 UMA_HISTOGRAM_ENUMERATION("Linux.GlibcVersion", glibc_version_result, | 132 UMA_HISTOGRAM_ENUMERATION("Linux.GlibcVersion", glibc_version_result, |
| 131 UMA_LINUX_GLIBC_VERSION_COUNT); | 133 UMA_LINUX_GLIBC_VERSION_COUNT); |
| 132 #endif | 134 #endif |
| 133 } | 135 } |
| 134 | 136 |
| 135 void RecordLinuxWindowManager() { | 137 void RecordLinuxWindowManager() { |
| 136 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 138 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 137 ui::WindowManagerName name = ui::GuessWindowManager(); | 139 ui::WindowManagerName name = ui::GuessWindowManager(); |
| 138 UMALinuxWindowManager uma_name = UMA_LINUX_WINDOW_MANAGER_OTHER; | 140 UMALinuxWindowManager uma_name = UMA_LINUX_WINDOW_MANAGER_OTHER; |
| 139 switch (name) { | 141 switch (name) { |
| 140 case ui::WM_UNKNOWN: | 142 case ui::WM_UNKNOWN: |
| 141 uma_name = UMA_LINUX_WINDOW_MANAGER_OTHER; | 143 uma_name = UMA_LINUX_WINDOW_MANAGER_OTHER; |
| 142 break; | 144 break; |
| 143 case ui::WM_BLACKBOX: | 145 case ui::WM_BLACKBOX: |
| 144 uma_name = UMA_LINUX_WINDOW_MANAGER_BLACKBOX; | 146 uma_name = UMA_LINUX_WINDOW_MANAGER_BLACKBOX; |
| 145 break; | 147 break; |
| 146 case ui::WM_CHROME_OS: | 148 case ui::WM_CHROME_OS: |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 #endif | 242 #endif |
| 241 } | 243 } |
| 242 | 244 |
| 243 namespace chrome { | 245 namespace chrome { |
| 244 | 246 |
| 245 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { | 247 void AddMetricsExtraParts(ChromeBrowserMainParts* main_parts) { |
| 246 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); | 248 main_parts->AddParts(new ChromeBrowserMainExtraPartsMetrics()); |
| 247 } | 249 } |
| 248 | 250 |
| 249 } // namespace chrome | 251 } // namespace chrome |
| OLD | NEW |