diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-13 21:24:39 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-13 21:24:39 +0000 |
commit | e6e30ac7da61cf09099d861344b3c22e5d5d158c (patch) | |
tree | 3d6df38aeec8737b3aac899ab2079d77511a96e6 /content/renderer | |
parent | 662e95081cfe6aa20be3a367d7e12b71f9d790b3 (diff) | |
download | chromium_src-e6e30ac7da61cf09099d861344b3c22e5d5d158c.zip chromium_src-e6e30ac7da61cf09099d861344b3c22e5d5d158c.tar.gz chromium_src-e6e30ac7da61cf09099d861344b3c22e5d5d158c.tar.bz2 |
Move the guts of user_metrics to a new static lib in //base/metrics.
I retained a couple of wrapper functions in content that post back to the UI thread if they are called from another thread. All existing code will continue to use these wrappers. The intent is that some code that I don't want to depend on content that only lives on the UI thread can now call //base/metrics code directly.
R=isherman@chromium.org, jam@chromium.org
http://crbug.com/332504
Review URL: https://codereview.chromium.org/129223004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/npapi/webplugin_impl.cc | 3 | ||||
-rw-r--r-- | content/renderer/render_thread_impl.cc | 2 | ||||
-rw-r--r-- | content/renderer/render_thread_impl.h | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc index 9f6129b..c8db6d5 100644 --- a/content/renderer/npapi/webplugin_impl.cc +++ b/content/renderer/npapi/webplugin_impl.cc @@ -10,6 +10,7 @@ #include "base/logging.h" #include "base/memory/linked_ptr.h" #include "base/message_loop/message_loop.h" +#include "base/metrics/user_metrics_action.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" @@ -955,7 +956,7 @@ void WebPluginImpl::didReceiveResponse(WebURLLoader* loader, &instance_size); } else if (response.httpStatusCode() == kHttpResponseSuccessStatusCode) { RenderThreadImpl::current()->RecordAction( - UserMetricsAction("Plugin_200ForByteRange")); + base::UserMetricsAction("Plugin_200ForByteRange")); // If the client issued a byte range request and the server responds with // HTTP 200 OK, it indicates that the server does not support byte range // requests. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 50beaca..28a4621 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -736,7 +736,7 @@ void RenderThreadImpl::RegisterSchemes() { WebSecurityPolicy::registerURLSchemeAsEmptyDocument(swappedout_scheme); } -void RenderThreadImpl::RecordAction(const UserMetricsAction& action) { +void RenderThreadImpl::RecordAction(const base::UserMetricsAction& action) { Send(new ViewHostMsg_UserMetricsRecordAction(action.str_)); } diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 6e77c99..16d2cb4 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h @@ -10,6 +10,7 @@ #include <vector> #include "base/memory/memory_pressure_listener.h" +#include "base/metrics/user_metrics_action.h" #include "base/observer_list.h" #include "base/process/process_handle.h" #include "base/strings/string16.h" @@ -133,7 +134,7 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread, virtual void SetResourceDispatcherDelegate( ResourceDispatcherDelegate* delegate) OVERRIDE; virtual void EnsureWebKitInitialized() OVERRIDE; - virtual void RecordAction(const UserMetricsAction& action) OVERRIDE; + virtual void RecordAction(const base::UserMetricsAction& action) OVERRIDE; virtual void RecordComputedAction(const std::string& action) OVERRIDE; virtual scoped_ptr<base::SharedMemory> HostAllocateSharedMemoryBuffer( size_t buffer_size) OVERRIDE; |