Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: extensions/shell/browser/shell_extensions_api_client.cc

Issue 2331343012: Create MetricsPrivateDelegate for metricsPrivate behavior (Closed)
Patch Set: ExtensionsAPIClient owns MetricsPrivateDelegate instance Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/shell/browser/shell_extensions_api_client.cc
diff --git a/extensions/shell/browser/shell_extensions_api_client.cc b/extensions/shell/browser/shell_extensions_api_client.cc
index 527b883ab7f4d46f60cee33764177da457e0261d..9188ed75a863617609e08e7d8d38de610795b98d 100644
--- a/extensions/shell/browser/shell_extensions_api_client.cc
+++ b/extensions/shell/browser/shell_extensions_api_client.cc
@@ -4,13 +4,16 @@
#include "extensions/shell/browser/shell_extensions_api_client.h"
+#include "base/memory/ptr_util.h"
+#include "extensions/shell/browser/api/metrics_private/shell_metrics_private_delegate.h"
#include "extensions/shell/browser/shell_app_view_guest_delegate.h"
#include "extensions/shell/browser/shell_extension_web_contents_observer.h"
namespace extensions {
-ShellExtensionsAPIClient::ShellExtensionsAPIClient() {
-}
+ShellExtensionsAPIClient::ShellExtensionsAPIClient() {}
+
+ShellExtensionsAPIClient::~ShellExtensionsAPIClient() {}
void ShellExtensionsAPIClient::AttachWebContentsHelpers(
content::WebContents* web_contents) const {
@@ -22,4 +25,10 @@ AppViewGuestDelegate* ShellExtensionsAPIClient::CreateAppViewGuestDelegate()
return new ShellAppViewGuestDelegate();
}
+MetricsPrivateDelegate* ShellExtensionsAPIClient::GetMetricsPrivateDelegate() {
+ if (!metrics_private_delegate_)
+ metrics_private_delegate_.reset(new ShellMetricsPrivateDelegate());
+ return metrics_private_delegate_.get();
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698