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

Side by Side Diff: content/browser/user_metrics.cc

Issue 1014543003: Add an IPC method for Blink to call RapporService::RecordSample() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/browser/user_metrics.h" 5 #include "content/public/browser/user_metrics.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/metrics/user_metrics.h" 10 #include "base/metrics/user_metrics.h"
(...skipping 18 matching lines...) Expand all
29 BrowserThread::PostTask( 29 BrowserThread::PostTask(
30 BrowserThread::UI, 30 BrowserThread::UI,
31 FROM_HERE, 31 FROM_HERE,
32 base::Bind(&RecordComputedAction, action)); 32 base::Bind(&RecordComputedAction, action));
33 return; 33 return;
34 } 34 }
35 35
36 base::RecordComputedAction(action); 36 base::RecordComputedAction(action);
37 } 37 }
38 38
39 CONTENT_EXPORT void RecordRappor(
40 const std::string& metric,
41 const std::string& sample) {
42 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
43 BrowserThread::PostTask(
44 BrowserThread::UI,
45 FROM_HERE,
46 base::Bind(&RecordRappor, metric, sample));
47 return;
48 }
49
50 base::RecordRappor(metric, sample);
51 }
52
39 } // namespace content 53 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698