Changeset 150923 in webkit


Ignore:
Timestamp:
May 29, 2013 12:32:06 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Add more cellular technologies into the NetworkInfo enum
https://bugs.webkit.org/show_bug.cgi?id=116982

PR 340189
Patch by Otto Derek Cheung <otcheung@rim.com> on 2013-05-29
Reviewed by Rob Buis.

Provide more specific bandwidth speeds on different network
services our devices provide.

  • WebCoreSupport/NetworkInfoClientBlackBerry.cpp:

(WebCore):
(WebCore::NetworkInfoClientBlackBerry::bandwidth):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/ChangeLog

    r150915 r150923  
     12013-05-29  Otto Derek Cheung  <otcheung@rim.com>
     2
     3        [BlackBerry] Add more cellular technologies into the NetworkInfo enum
     4        https://bugs.webkit.org/show_bug.cgi?id=116982
     5
     6        PR 340189
     7        Reviewed by Rob Buis.
     8
     9        Provide more specific bandwidth speeds on different network
     10        services our devices provide.
     11
     12        * WebCoreSupport/NetworkInfoClientBlackBerry.cpp:
     13        (WebCore):
     14        (WebCore::NetworkInfoClientBlackBerry::bandwidth):
     15
    1162013-05-29  Yong Li  <yoli@rim.com>
    217
  • trunk/Source/WebKit/blackberry/WebCoreSupport/NetworkInfoClientBlackBerry.cpp

    r148667 r150923  
    11/*
    2  * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
     2 * Copyright (C) 2012, 2013 Research In Motion Limited. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    2828namespace WebCore {
    2929
    30 static const double  networkSpeedNone = 0; // 0 Mb/s
    31 static const double  networkSpeedEthernet = 20; // 20 Mb/s
    32 static const double  networkSpeedWifi = 20; // 20 Mb/s
    33 static const double  networkSpeed2G = 60 / 1024; // 60 kb/s
    34 static const double  networkSpeed3G = 7; // 7 Mb/s
    35 static const double  networkSpeed4G = 50; // 50 Mb/s
     30static const double  networkSpeedNone = 0;
     31static const double  networkSpeedEthernet = 20.0;
     32static const double  networkSpeedWifi = 20.0;
     33static const double  networkSpeedGPRS = 7.2 / 1024.0;
     34static const double  networkSpeedEDGE = 30.0 / 1024.0;
     35static const double  networkSpeedUMTS = 48.0 / 1024.0;
     36static const double  networkSpeedHSPA = 1.7;
     37static const double  networkSpeedHSPAP = 5.25;
     38static const double  networkSpeedCDMA = 18.0 / 1024.0;
     39static const double  networkSpeedEVDO = 307.0 / 1024.0;
     40static const double  networkSpeedEVDOA = 397.0 / 1024.0;
     41static const double  networkSpeedEHRPD = 21.625;
     42static const double  networkSpeedLTE = 21.625;
    3643static const double  networkSpeedDefault = INFINITY; // w3c draft states it should be infinity
    3744
     
    7077    case BlackBerry::Platform::NetworkTypeCellular:
    7178        switch (BlackBerry::Platform::NetworkInfo::instance()->getCurrentCellularType()) {
     79        case BlackBerry::Platform::CellularTypeGPRS:
     80            return networkSpeedGPRS;
    7281        case BlackBerry::Platform::CellularTypeEDGE:
    73             return networkSpeed2G;
     82            return networkSpeedEDGE;
     83        case BlackBerry::Platform::CellularTypeUMTS:
     84            return networkSpeedUMTS;
     85        case BlackBerry::Platform::CellularTypeHSPA:
     86            return networkSpeedHSPA;
     87        case BlackBerry::Platform::CellularTypeHSPAP:
     88            return networkSpeedHSPAP;
     89        case BlackBerry::Platform::CellularTypeCDMA:
     90            return networkSpeedCDMA;
    7491        case BlackBerry::Platform::CellularTypeEVDO:
    75         case BlackBerry::Platform::CellularTypeUMTS:
    76             return networkSpeed3G;
     92            return networkSpeedEVDO;
     93        case BlackBerry::Platform::CellularTypeEVDOA:
     94            return networkSpeedEVDOA;
     95        case BlackBerry::Platform::CellularTypeEHRPD:
     96            return networkSpeedEHRPD;
    7797        case BlackBerry::Platform::CellularTypeLTE:
    78             return networkSpeed4G;
     98            return networkSpeedLTE;
    7999        case BlackBerry::Platform::CellularTypeUnknown:
    80100            return networkSpeedDefault;
Note: See TracChangeset for help on using the changeset viewer.