diff options
author | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-03 01:19:49 +0000 |
---|---|---|
committer | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-03 01:19:49 +0000 |
commit | db683c912eaf6b81ba64d49d4b3d796450609c90 (patch) | |
tree | 1df96ee27e4cdf4ece4897ed9c59554fa0f854d9 /chrome/browser/plugins | |
parent | febabf5b375a681dc96d239b5d6d218708ac2a37 (diff) | |
download | chromium_src-db683c912eaf6b81ba64d49d4b3d796450609c90.zip chromium_src-db683c912eaf6b81ba64d49d4b3d796450609c90.tar.gz chromium_src-db683c912eaf6b81ba64d49d4b3d796450609c90.tar.bz2 |
Reduce plugin_metrics_provider_ usage in MetricsService
This CL eliminates MetricsService's call to
PluginMetricsProvider::RecordPluginChanges (replaced by a new API on
MetricsProvider). It additionally adds a
MetricsServicesManager::OnPluginLoadingError() API and has the plugin observer
call that API rather than calling MetricsService directly. This change will
enable easily moving MetricsService::LogPluginLoadingError() to
ChromeMetricsServiceClient once the latter is the class that keeps a weak
pointer to the plugin metrics provider.
BUG=375776
Review URL: https://codereview.chromium.org/308433004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugins')
-rw-r--r-- | chrome/browser/plugins/plugin_observer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc index 9c91704..9accbf8 100644 --- a/chrome/browser/plugins/plugin_observer.cc +++ b/chrome/browser/plugins/plugin_observer.cc @@ -15,7 +15,7 @@ #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/infobars/simple_alert_infobar_delegate.h" #include "chrome/browser/lifetime/application_lifetime.h" -#include "chrome/browser/metrics/metrics_service.h" +#include "chrome/browser/metrics/metrics_services_manager.h" #include "chrome/browser/plugins/plugin_finder.h" #include "chrome/browser/plugins/plugin_infobar_delegates.h" #include "chrome/browser/profiles/profile.h" @@ -458,7 +458,8 @@ void PluginObserver::OnOpenAboutPlugins() { } void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) { - g_browser_process->metrics_service()->LogPluginLoadingError(plugin_path); + g_browser_process->GetMetricsServicesManager()->OnPluginLoadingError( + plugin_path); base::string16 plugin_name = PluginService::GetInstance()->GetPluginDisplayNameByPath(plugin_path); SimpleAlertInfoBarDelegate::Create( |