1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/public/browser/user_metrics.h"
10 #include "base/metrics/user_metrics.h"
11 #include "content/public/browser/browser_thread.h"
15 void RecordAction(const base::UserMetricsAction
& action
) {
16 if (!BrowserThread::CurrentlyOn(BrowserThread::UI
)) {
17 BrowserThread::PostTask(
20 base::Bind(&RecordAction
, action
));
24 base::RecordAction(action
);
27 void RecordComputedAction(const std::string
& action
) {
28 if (!BrowserThread::CurrentlyOn(BrowserThread::UI
)) {
29 BrowserThread::PostTask(
32 base::Bind(&RecordComputedAction
, action
));
36 base::RecordComputedAction(action
);
39 } // namespace content