~mandel/ubuntu-download-manager/wily-add-appid-metadata

« back to all changes in this revision

Viewing changes to src/downloads/priv/ubuntu/downloads/file_download.cpp

  • Committer: CI bot
  • Author(s): Manuel de la Pena, Manuel de la Peña
  • Date: 2014-11-26 12:56:56 UTC
  • mfrom: (330.1.17 adapt-network-changes)
  • Revision ID: ps-jenkins@lists.canonical.com-20141126125656-ixnxtea9a4h5eo6p
Ensure that the download manager does track network changes correctly. Fixes: #1235138, #1390205
Approved by: Barry Warsaw, PS Jenkins bot, Manuel de la Peña

Show diffs side-by-side

added added

removed removed

Lines of Context:
815
815
FileDownload::init() {
816
816
    _requestFactory = RequestFactory::instance();
817
817
    _fileNameMutex = FileNameMutex::instance();
818
 
    SystemNetworkInfo* networkInfo = SystemNetworkInfo::instance();
819
 
    _connected = networkInfo->isOnline();
 
818
    _connected = NetworkSession::instance()->isOnline();
820
819
    _downloading = false;
821
820
 
822
821
    // applications that are confined are not allowed to set the click metadata.
825
824
    }
826
825
 
827
826
    // connect to the network changed signals
828
 
    CHECK(connect(networkInfo, &SystemNetworkInfo::onlineStateChanged,
 
827
    CHECK(connect(NetworkSession::instance(), &NetworkSession::onlineStateChanged,
829
828
        this, &FileDownload::onOnlineStateChanged))
830
829
            << "Could not connect to signal";
831
830