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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp

Issue 2863973003: Expose RTT and downlink bandwidth using experimental Javascript API (Closed)
Patch Set: Rebase, haraken's comment Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 36
37 void WebNetworkStateNotifier::SetOnLine(bool on_line) { 37 void WebNetworkStateNotifier::SetOnLine(bool on_line) {
38 GetNetworkStateNotifier().SetOnLine(on_line); 38 GetNetworkStateNotifier().SetOnLine(on_line);
39 } 39 }
40 40
41 void WebNetworkStateNotifier::SetWebConnection(WebConnectionType type, 41 void WebNetworkStateNotifier::SetWebConnection(WebConnectionType type,
42 double max_bandwidth_mbps) { 42 double max_bandwidth_mbps) {
43 GetNetworkStateNotifier().SetWebConnection(type, max_bandwidth_mbps); 43 GetNetworkStateNotifier().SetWebConnection(type, max_bandwidth_mbps);
44 } 44 }
45 45
46 void WebNetworkStateNotifier::SetNetworkQuality(TimeDelta http_rtt,
dcheng 2017/05/19 19:19:18 The header declares this as base::TimeDelta while
tbansal1 2017/05/19 19:28:59 I am not sure. The alternative is to pass the base
dcheng 2017/05/19 19:40:14 Sorry to be clear, this question is aimed for hara
47 TimeDelta transport_rtt,
48 int downlink_throughput_kbps) {
49 GetNetworkStateNotifier().SetNetworkQuality(http_rtt, transport_rtt,
50 downlink_throughput_kbps);
51 }
52
46 } // namespace blink 53 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698