| 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 WritePluginStabilityElements(plugin_list, pref); | 338 WritePluginStabilityElements(plugin_list, pref); |
| 339 } | 339 } |
| 340 } | 340 } |
| 341 | 341 |
| 342 PrefService* MetricsLog::GetPrefService() { | 342 PrefService* MetricsLog::GetPrefService() { |
| 343 return g_browser_process->local_state(); | 343 return g_browser_process->local_state(); |
| 344 } | 344 } |
| 345 | 345 |
| 346 gfx::Size MetricsLog::GetScreenSize() const { | 346 gfx::Size MetricsLog::GetScreenSize() const { |
| 347 return gfx::Screen::GetPrimaryDisplay().GetSizeInPixel(); | 347 return gfx::Screen::GetPrimaryDisplay( |
| 348 gfx::Screen::BadTwoWorldsContext()).GetSizeInPixel(); |
| 348 } | 349 } |
| 349 | 350 |
| 350 float MetricsLog::GetScreenDeviceScaleFactor() const { | 351 float MetricsLog::GetScreenDeviceScaleFactor() const { |
| 351 return gfx::Screen::GetPrimaryDisplay().device_scale_factor(); | 352 return gfx::Screen::GetPrimaryDisplay( |
| 353 gfx::Screen::BadTwoWorldsContext()).device_scale_factor(); |
| 352 } | 354 } |
| 353 | 355 |
| 354 int MetricsLog::GetScreenCount() const { | 356 int MetricsLog::GetScreenCount() const { |
| 355 return gfx::Screen::GetNumDisplays(); | 357 return gfx::Screen::GetNumDisplays(gfx::Screen::BadTwoWorldsContext()); |
| 356 } | 358 } |
| 357 | 359 |
| 358 void MetricsLog::GetFieldTrialIds( | 360 void MetricsLog::GetFieldTrialIds( |
| 359 std::vector<SelectedGroupId>* field_trial_ids) const { | 361 std::vector<SelectedGroupId>* field_trial_ids) const { |
| 360 chrome_variations::GetFieldTrialSelectedGroupIds(field_trial_ids); | 362 chrome_variations::GetFieldTrialSelectedGroupIds(field_trial_ids); |
| 361 } | 363 } |
| 362 | 364 |
| 363 void MetricsLog::WriteStabilityElement( | 365 void MetricsLog::WriteStabilityElement( |
| 364 const std::vector<webkit::WebPluginInfo>& plugin_list, | 366 const std::vector<webkit::WebPluginInfo>& plugin_list, |
| 365 PrefService* pref) { | 367 PrefService* pref) { |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1009 ProductDataToProto(google_update_metrics.google_update_data, | 1011 ProductDataToProto(google_update_metrics.google_update_data, |
| 1010 google_update->mutable_google_update_status()); | 1012 google_update->mutable_google_update_status()); |
| 1011 } | 1013 } |
| 1012 | 1014 |
| 1013 if (!google_update_metrics.product_data.version.empty()) { | 1015 if (!google_update_metrics.product_data.version.empty()) { |
| 1014 ProductDataToProto(google_update_metrics.product_data, | 1016 ProductDataToProto(google_update_metrics.product_data, |
| 1015 google_update->mutable_client_status()); | 1017 google_update->mutable_client_status()); |
| 1016 } | 1018 } |
| 1017 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 1019 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
| 1018 } | 1020 } |
| OLD | NEW |