1 // Copyright 2014 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 "ios/web/public/user_metrics.h"
10 #include "base/location.h"
11 #include "base/metrics/user_metrics.h"
12 #include "ios/web/public/web_thread.h"
16 void RecordAction(const base::UserMetricsAction
& action
) {
17 if (!WebThread::CurrentlyOn(WebThread::UI
)) {
18 WebThread::PostTask(WebThread::UI
, FROM_HERE
,
19 base::Bind(&web::RecordAction
, action
));
23 base::RecordAction(action
);
26 void RecordComputedAction(const std::string
& action
) {
27 if (!WebThread::CurrentlyOn(WebThread::UI
)) {
28 WebThread::PostTask(WebThread::UI
, FROM_HERE
,
29 base::Bind(&web::RecordComputedAction
, action
));
33 base::RecordComputedAction(action
);