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

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: ChromeRenderMessageFilter, and add a URL version for bug 467648 Created 5 years, 8 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 //------------------------------------------------------------------------------ 1014 //------------------------------------------------------------------------------
1015 1015
1016 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode( 1016 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode(
1017 const blink::WebString& host, 1017 const blink::WebString& host,
1018 const blink::WebString& languages) { 1018 const blink::WebString& languages) {
1019 return net::IDNToUnicode(host.utf8(), languages.utf8()); 1019 return net::IDNToUnicode(host.utf8(), languages.utf8());
1020 } 1020 }
1021 1021
1022 //------------------------------------------------------------------------------ 1022 //------------------------------------------------------------------------------
1023 1023
1024 void RendererBlinkPlatformImpl::recordRappor(
1025 const char* metric, const blink::WebString& sample) {
Alexei Svitkine (slow) 2015/04/07 21:01:56 Nit: 1 param per line when the first one wraps. I
kojii 2015/04/08 07:21:23 Done, didn't know "git cl format", very nice, than
1026 content::GetContentClient()->renderer()->RecordRappor(metric, sample.utf8());
1027 }
1028
1029 void RendererBlinkPlatformImpl::recordRapporURL(
1030 const char* metric, const blink::WebURL& url) {
1031 content::GetContentClient()->renderer()->RecordRapporURL(metric, url);
jam 2015/04/07 20:57:44 here and above, remove "content::"
kojii 2015/04/08 07:21:23 Done.
1032 }
1033
1034 //------------------------------------------------------------------------------
1035
1024 // static 1036 // static
1025 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) { 1037 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) {
1026 g_test_device_light_data = data; 1038 g_test_device_light_data = data;
1027 } 1039 }
1028 1040
1029 //------------------------------------------------------------------------------ 1041 //------------------------------------------------------------------------------
1030 1042
1031 // static 1043 // static
1032 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting( 1044 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting(
1033 const blink::WebDeviceMotionData& data) { 1045 const blink::WebDeviceMotionData& data) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 //------------------------------------------------------------------------------ 1225 //------------------------------------------------------------------------------
1214 1226
1215 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1227 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1216 const blink::WebBatteryStatus& status) { 1228 const blink::WebBatteryStatus& status) {
1217 if (!g_test_battery_status_listener) 1229 if (!g_test_battery_status_listener)
1218 return; 1230 return;
1219 g_test_battery_status_listener->updateBatteryStatus(status); 1231 g_test_battery_status_listener->updateBatteryStatus(status);
1220 } 1232 }
1221 1233
1222 } // namespace content 1234 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698