OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/metrics_log.h" | 5 #include "chrome/browser/metrics/metrics_log.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 341 |
342 WritePluginStabilityElements(plugin_list, pref); | 342 WritePluginStabilityElements(plugin_list, pref); |
343 } | 343 } |
344 } | 344 } |
345 | 345 |
346 PrefService* MetricsLog::GetPrefService() { | 346 PrefService* MetricsLog::GetPrefService() { |
347 return g_browser_process->local_state(); | 347 return g_browser_process->local_state(); |
348 } | 348 } |
349 | 349 |
350 gfx::Size MetricsLog::GetScreenSize() const { | 350 gfx::Size MetricsLog::GetScreenSize() const { |
351 return gfx::Screen::GetPrimaryDisplay().GetSizeInPixel(); | 351 return gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().GetSizeInPixel(); |
352 } | 352 } |
353 | 353 |
354 float MetricsLog::GetScreenDeviceScaleFactor() const { | 354 float MetricsLog::GetScreenDeviceScaleFactor() const { |
355 return gfx::Screen::GetPrimaryDisplay().device_scale_factor(); | 355 return gfx::Screen::GetNativeScreen()-> |
| 356 GetPrimaryDisplay().device_scale_factor(); |
356 } | 357 } |
357 | 358 |
358 int MetricsLog::GetScreenCount() const { | 359 int MetricsLog::GetScreenCount() const { |
359 return gfx::Screen::GetNumDisplays(); | 360 // TODO(scottmg): NativeScreen maybe wrong. http://crbug.com/133312 |
| 361 return gfx::Screen::GetNativeScreen()->GetNumDisplays(); |
360 } | 362 } |
361 | 363 |
362 void MetricsLog::GetFieldTrialIds( | 364 void MetricsLog::GetFieldTrialIds( |
363 std::vector<SelectedGroupId>* field_trial_ids) const { | 365 std::vector<SelectedGroupId>* field_trial_ids) const { |
364 chrome_variations::GetFieldTrialSelectedGroupIds(field_trial_ids); | 366 chrome_variations::GetFieldTrialSelectedGroupIds(field_trial_ids); |
365 } | 367 } |
366 | 368 |
367 void MetricsLog::WriteStabilityElement( | 369 void MetricsLog::WriteStabilityElement( |
368 const std::vector<webkit::WebPluginInfo>& plugin_list, | 370 const std::vector<webkit::WebPluginInfo>& plugin_list, |
369 PrefService* pref) { | 371 PrefService* pref) { |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 ProductDataToProto(google_update_metrics.google_update_data, | 1019 ProductDataToProto(google_update_metrics.google_update_data, |
1018 google_update->mutable_google_update_status()); | 1020 google_update->mutable_google_update_status()); |
1019 } | 1021 } |
1020 | 1022 |
1021 if (!google_update_metrics.product_data.version.empty()) { | 1023 if (!google_update_metrics.product_data.version.empty()) { |
1022 ProductDataToProto(google_update_metrics.product_data, | 1024 ProductDataToProto(google_update_metrics.product_data, |
1023 google_update->mutable_client_status()); | 1025 google_update->mutable_client_status()); |
1024 } | 1026 } |
1025 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 1027 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
1026 } | 1028 } |
OLD | NEW |