diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 17:56:56 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 17:56:56 +0000 |
commit | 1008498ab41bfb8fde2623f99c9e9d80f08d63c5 (patch) | |
tree | d6901e3ba9b3f841f26224ee2288284f59b885ce /chrome | |
parent | 61b2503325818c6ed8b4c983a342598c09d90d11 (diff) | |
download | chromium_src-1008498ab41bfb8fde2623f99c9e9d80f08d63c5.zip chromium_src-1008498ab41bfb8fde2623f99c9e9d80f08d63c5.tar.gz chromium_src-1008498ab41bfb8fde2623f99c9e9d80f08d63c5.tar.bz2 |
Use plugin state from default profile in metrics log.
BUG=80794
TEST=none
Review URL: http://codereview.chromium.org/7497062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/metrics/metrics_log.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc index 8200f44..fc5fc76 100644 --- a/chrome/browser/metrics/metrics_log.cc +++ b/chrome/browser/metrics/metrics_log.cc @@ -20,7 +20,9 @@ #include "chrome/browser/autocomplete/autocomplete_match.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/metrics/display_utils.h" +#include "chrome/browser/plugin_prefs.h" #include "chrome/browser/prefs/pref_service.h" +#include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/chrome_version_info.h" #include "chrome/common/logging_chrome.h" #include "chrome/common/pref_names.h" @@ -273,6 +275,10 @@ void MetricsLog::WritePluginList( const std::vector<webkit::WebPluginInfo>& plugin_list) { DCHECK(!locked_); + ProfileManager* profile_manager = g_browser_process->profile_manager(); + PluginPrefs* plugin_prefs = + PluginPrefs::GetForProfile(profile_manager->GetLoadedProfiles().front()); + OPEN_ELEMENT_FOR_SCOPE("plugins"); for (std::vector<webkit::WebPluginInfo>::const_iterator iter = @@ -291,8 +297,7 @@ void MetricsLog::WritePluginList( #endif WriteAttribute("filename", CreateBase64Hash(filename_bytes)); WriteAttribute("version", UTF16ToUTF8(iter->version)); - // TODO(bauerb): Plug-in state is per-profile. - WriteIntAttribute("disabled", !webkit::IsPluginEnabled(*iter)); + WriteIntAttribute("disabled", !plugin_prefs->IsPluginEnabled(*iter)); } } |