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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 years, 9 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/browser/guest_view/web_view/web_view_guest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index ec6c59e62ec9cd9a33a022e49bc1d9803e546bd9..77ac6851c20c257638a576b06ffa94628edaa0e4 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -10,6 +10,7 @@
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/user_metrics.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
@@ -34,7 +35,6 @@
#include "content/public/browser/resource_request_details.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/storage_partition.h"
-#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/browser_side_navigation_policy.h"
@@ -335,8 +335,7 @@ void WebViewGuest::CreateWebContents(
// creation. If the validation fails, treat it as a bad message and kill the
// renderer process.
if (!base::IsStringUTF8(storage_partition_id)) {
- content::RecordAction(
- base::UserMetricsAction("BadMessageTerminate_BPGM"));
+ base::RecordAction(base::UserMetricsAction("BadMessageTerminate_BPGM"));
owner_render_process_host->Shutdown(content::RESULT_CODE_KILLED_BAD_MESSAGE,
false);
callback.Run(nullptr);
@@ -761,7 +760,7 @@ void WebViewGuest::SetUserAgentOverride(
const std::string& user_agent_override) {
is_overriding_user_agent_ = !user_agent_override.empty();
if (is_overriding_user_agent_) {
- content::RecordAction(UserMetricsAction("WebView.Guest.OverrideUA"));
+ base::RecordAction(UserMetricsAction("WebView.Guest.OverrideUA"));
}
web_contents()->SetUserAgentOverride(user_agent_override);
}
@@ -771,7 +770,7 @@ void WebViewGuest::Stop() {
}
void WebViewGuest::Terminate() {
- content::RecordAction(UserMetricsAction("WebView.Guest.Terminate"));
+ base::RecordAction(UserMetricsAction("WebView.Guest.Terminate"));
base::ProcessHandle process_handle =
web_contents()->GetRenderProcessHost()->GetHandle();
if (process_handle)
@@ -782,7 +781,7 @@ void WebViewGuest::Terminate() {
bool WebViewGuest::ClearData(base::Time remove_since,
uint32_t removal_mask,
const base::Closure& callback) {
- content::RecordAction(UserMetricsAction("WebView.Guest.ClearData"));
+ base::RecordAction(UserMetricsAction("WebView.Guest.ClearData"));
content::StoragePartition* partition =
content::BrowserContext::GetStoragePartition(
web_contents()->GetBrowserContext(),
« no previous file with comments | « extensions/browser/extension_function.cc ('k') | extensions/browser/guest_view/web_view/web_view_permission_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698