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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.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: Changed to ETLD_PLUS_ONE 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 //------------------------------------------------------------------------------ 1002 //------------------------------------------------------------------------------
1003 1003
1004 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode( 1004 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode(
1005 const blink::WebString& host, 1005 const blink::WebString& host,
1006 const blink::WebString& languages) { 1006 const blink::WebString& languages) {
1007 return net::IDNToUnicode(host.utf8(), languages.utf8()); 1007 return net::IDNToUnicode(host.utf8(), languages.utf8());
1008 } 1008 }
1009 1009
1010 //------------------------------------------------------------------------------ 1010 //------------------------------------------------------------------------------
1011 1011
1012 void RendererBlinkPlatformImpl::recordRappor(
1013 const char* metric, const blink::WebString& sample) {
timvolodine 2015/03/25 18:56:19 koji@: can we simply use blink::WebURL here? and t
1014 RenderThreadImpl::current()->RecordRappor(metric, sample.utf8());
Steven Holte 2015/03/25 17:57:26 What's the format of the sample? Is it a full hos
1015 }
1016
1017 //------------------------------------------------------------------------------
1018
1012 // static 1019 // static
1013 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) { 1020 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) {
1014 g_test_device_light_data = data; 1021 g_test_device_light_data = data;
1015 } 1022 }
1016 1023
1017 //------------------------------------------------------------------------------ 1024 //------------------------------------------------------------------------------
1018 1025
1019 // static 1026 // static
1020 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting( 1027 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting(
1021 const blink::WebDeviceMotionData& data) { 1028 const blink::WebDeviceMotionData& data) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 //------------------------------------------------------------------------------ 1208 //------------------------------------------------------------------------------
1202 1209
1203 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1210 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1204 const blink::WebBatteryStatus& status) { 1211 const blink::WebBatteryStatus& status) {
1205 if (!g_test_battery_status_listener) 1212 if (!g_test_battery_status_listener)
1206 return; 1213 return;
1207 g_test_battery_status_listener->updateBatteryStatus(status); 1214 g_test_battery_status_listener->updateBatteryStatus(status);
1208 } 1215 }
1209 1216
1210 } // namespace content 1217 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698