LCOV - code coverage report
Current view: top level - dom/network - ConnectionMainThread.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 20 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 6 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
       3             : /* This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       5             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #include <limits>
       8             : #include "mozilla/Hal.h"
       9             : #include "ConnectionMainThread.h"
      10             : 
      11             : namespace mozilla {
      12             : namespace dom {
      13             : namespace network {
      14             : 
      15           0 : ConnectionMainThread::ConnectionMainThread(nsPIDOMWindowInner* aWindow)
      16           0 :   : Connection(aWindow)
      17             : {
      18           0 :   hal::RegisterNetworkObserver(this);
      19             : 
      20           0 :   hal::NetworkInformation networkInfo;
      21           0 :   hal::GetCurrentNetworkInformation(&networkInfo);
      22             : 
      23           0 :   UpdateFromNetworkInfo(networkInfo, false);
      24           0 : }
      25             : 
      26           0 : ConnectionMainThread::~ConnectionMainThread()
      27             : {
      28           0 :   Shutdown();
      29           0 : }
      30             : 
      31             : void
      32           0 : ConnectionMainThread::ShutdownInternal()
      33             : {
      34           0 :   hal::UnregisterNetworkObserver(this);
      35           0 : }
      36             : 
      37             : void
      38           0 : ConnectionMainThread::UpdateFromNetworkInfo(const hal::NetworkInformation& aNetworkInfo,
      39             :                                             bool aNotify)
      40             : {
      41           0 :   Update(static_cast<ConnectionType>(aNetworkInfo.type()),
      42           0 :          aNetworkInfo.isWifi(), aNetworkInfo.dhcpGateway(), aNotify);
      43           0 : }
      44             : 
      45             : void
      46           0 : ConnectionMainThread::Notify(const hal::NetworkInformation& aNetworkInfo)
      47             : {
      48           0 :   UpdateFromNetworkInfo(aNetworkInfo, true);
      49           0 : }
      50             : 
      51             : } // namespace network
      52             : } // namespace dom
      53             : } // namespace mozilla

Generated by: LCOV version 1.13