| 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 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/common/chrome_version_info.h" | 27 #include "chrome/common/chrome_version_info.h" |
| 28 #include "chrome/common/logging_chrome.h" | 28 #include "chrome/common/logging_chrome.h" |
| 29 #include "chrome/common/metrics/proto/omnibox_event.pb.h" | 29 #include "chrome/common/metrics/proto/omnibox_event.pb.h" |
| 30 #include "chrome/common/metrics/proto/system_profile.pb.h" | 30 #include "chrome/common/metrics/proto/system_profile.pb.h" |
| 31 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
| 32 #include "content/public/browser/content_browser_client.h" | 32 #include "content/public/browser/content_browser_client.h" |
| 33 #include "content/public/browser/gpu_data_manager.h" | 33 #include "content/public/browser/gpu_data_manager.h" |
| 34 #include "content/public/common/gpu_info.h" | 34 #include "content/public/common/gpu_info.h" |
| 35 #include "content/public/common/content_client.h" | 35 #include "content/public/common/content_client.h" |
| 36 #include "googleurl/src/gurl.h" | 36 #include "googleurl/src/gurl.h" |
| 37 #include "ui/gfx/monitor.h" |
| 37 #include "ui/gfx/screen.h" | 38 #include "ui/gfx/screen.h" |
| 38 #include "webkit/plugins/webplugininfo.h" | 39 #include "webkit/plugins/webplugininfo.h" |
| 39 | 40 |
| 40 #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) | 41 #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) |
| 41 | 42 |
| 42 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx | 43 // http://blogs.msdn.com/oldnewthing/archive/2004/10/25/247180.aspx |
| 43 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 44 extern "C" IMAGE_DOS_HEADER __ImageBase; | 45 extern "C" IMAGE_DOS_HEADER __ImageBase; |
| 45 #endif | 46 #endif |
| 46 | 47 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 | 258 |
| 258 WritePluginStabilityElements(plugin_list, pref); | 259 WritePluginStabilityElements(plugin_list, pref); |
| 259 } | 260 } |
| 260 } | 261 } |
| 261 | 262 |
| 262 PrefService* MetricsLog::GetPrefService() { | 263 PrefService* MetricsLog::GetPrefService() { |
| 263 return g_browser_process->local_state(); | 264 return g_browser_process->local_state(); |
| 264 } | 265 } |
| 265 | 266 |
| 266 gfx::Size MetricsLog::GetScreenSize() const { | 267 gfx::Size MetricsLog::GetScreenSize() const { |
| 267 return gfx::Screen::GetPrimaryMonitorSize(); | 268 return gfx::Screen::GetPrimaryMonitor()->GetSize(); |
| 268 } | 269 } |
| 269 | 270 |
| 270 int MetricsLog::GetScreenCount() const { | 271 int MetricsLog::GetScreenCount() const { |
| 271 return gfx::Screen::GetNumMonitors(); | 272 return gfx::Screen::GetNumMonitors(); |
| 272 } | 273 } |
| 273 | 274 |
| 274 | 275 |
| 275 void MetricsLog::GetFieldTrialIds( | 276 void MetricsLog::GetFieldTrialIds( |
| 276 std::vector<NameGroupId>* field_trial_ids) const { | 277 std::vector<NameGroupId>* field_trial_ids) const { |
| 277 base::FieldTrialList::GetFieldTrialNameGroupIds(field_trial_ids); | 278 base::FieldTrialList::GetFieldTrialNameGroupIds(field_trial_ids); |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 i != log.result.end(); ++i) { | 832 i != log.result.end(); ++i) { |
| 832 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); | 833 OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion(); |
| 833 suggestion->set_provider(AsOmniboxEventProviderType(i->provider)); | 834 suggestion->set_provider(AsOmniboxEventProviderType(i->provider)); |
| 834 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); | 835 suggestion->set_result_type(AsOmniboxEventResultType(i->type)); |
| 835 suggestion->set_relevance(i->relevance); | 836 suggestion->set_relevance(i->relevance); |
| 836 suggestion->set_is_starred(i->starred); | 837 suggestion->set_is_starred(i->starred); |
| 837 } | 838 } |
| 838 | 839 |
| 839 ++num_events_; | 840 ++num_events_; |
| 840 } | 841 } |
| OLD | NEW |