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

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: 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
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/numerics/safe_conversions.h" 14 #include "base/numerics/safe_conversions.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "cc/blink/context_provider_web_context.h" 17 #include "cc/blink/context_provider_web_context.h"
18 #include "components/rappor/content/common/rappor_messages.h"
18 #include "content/child/database_util.h" 19 #include "content/child/database_util.h"
19 #include "content/child/file_info_util.h" 20 #include "content/child/file_info_util.h"
20 #include "content/child/fileapi/webfilesystem_impl.h" 21 #include "content/child/fileapi/webfilesystem_impl.h"
21 #include "content/child/indexed_db/webidbfactory_impl.h" 22 #include "content/child/indexed_db/webidbfactory_impl.h"
22 #include "content/child/npapi/npobject_util.h" 23 #include "content/child/npapi/npobject_util.h"
23 #include "content/child/quota_dispatcher.h" 24 #include "content/child/quota_dispatcher.h"
24 #include "content/child/quota_message_filter.h" 25 #include "content/child/quota_message_filter.h"
25 #include "content/child/simple_webmimeregistry_impl.h" 26 #include "content/child/simple_webmimeregistry_impl.h"
26 #include "content/child/thread_safe_sender.h" 27 #include "content/child/thread_safe_sender.h"
27 #include "content/child/web_database_observer_impl.h" 28 #include "content/child/web_database_observer_impl.h"
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 //------------------------------------------------------------------------------ 1015 //------------------------------------------------------------------------------
1015 1016
1016 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode( 1017 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode(
1017 const blink::WebString& host, 1018 const blink::WebString& host,
1018 const blink::WebString& languages) { 1019 const blink::WebString& languages) {
1019 return net::IDNToUnicode(host.utf8(), languages.utf8()); 1020 return net::IDNToUnicode(host.utf8(), languages.utf8());
1020 } 1021 }
1021 1022
1022 //------------------------------------------------------------------------------ 1023 //------------------------------------------------------------------------------
1023 1024
1025 void RendererBlinkPlatformImpl::recordRappor(
1026 const char* metric, const blink::WebString& sample) {
1027 RenderThread::Get()->Send(
1028 new RapporHostMsg_RecordSample(metric, sample.utf8()));
1029 }
1030
1031 //------------------------------------------------------------------------------
1032
1024 // static 1033 // static
1025 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) { 1034 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) {
1026 g_test_device_light_data = data; 1035 g_test_device_light_data = data;
1027 } 1036 }
1028 1037
1029 //------------------------------------------------------------------------------ 1038 //------------------------------------------------------------------------------
1030 1039
1031 // static 1040 // static
1032 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting( 1041 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting(
1033 const blink::WebDeviceMotionData& data) { 1042 const blink::WebDeviceMotionData& data) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 //------------------------------------------------------------------------------ 1222 //------------------------------------------------------------------------------
1214 1223
1215 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1224 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1216 const blink::WebBatteryStatus& status) { 1225 const blink::WebBatteryStatus& status) {
1217 if (!g_test_battery_status_listener) 1226 if (!g_test_battery_status_listener)
1218 return; 1227 return;
1219 g_test_battery_status_listener->updateBatteryStatus(status); 1228 g_test_battery_status_listener->updateBatteryStatus(status);
1220 } 1229 }
1221 1230
1222 } // namespace content 1231 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | ipc/ipc_message_start.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698