Home | History | Annotate | Download | only in update_engine

Lines Matching defs:source

2 // Copyright (C) 2012 The Android Open Source Project
88 DownloadSource source = static_cast<DownloadSource>(i);
89 LoadCurrentBytesDownloaded(source);
90 LoadTotalBytesDownloaded(source);
136 // Update the current download source which depends on the latest value of
143 // Update the current download source which depends on whether we are
533 LOG(INFO) << "Current download source: "
678 DownloadSource source = static_cast<DownloadSource>(i);
681 // Only consider this download source (and send byte counts) as
687 bytes = GetCurrentBytesDownloaded(source);
690 SetCurrentBytesDownloaded(source, 0, true);
692 bytes = GetTotalBytesDownloaded(source);
696 SetTotalBytesDownloaded(source, 0, true);
779 DownloadSource source = static_cast<DownloadSource>(i);
780 SetCurrentBytesDownloaded(source, 0, true);
883 // Also update the download source, which is purely dependent on the
1098 string PayloadState::GetPrefsKey(const string& prefix, DownloadSource source) {
1099 return prefix + "-from-" + utils::ToString(source);
1102 void PayloadState::LoadCurrentBytesDownloaded(DownloadSource source) {
1103 string key = GetPrefsKey(kPrefsCurrentBytesDownloaded, source);
1104 SetCurrentBytesDownloaded(source, GetPersistedValue(key), true);
1108 DownloadSource source,
1113 if (source >= kNumDownloadSources)
1117 current_bytes_downloaded_[source] = current_bytes_downloaded;
1119 string prefs_key = GetPrefsKey(kPrefsCurrentBytesDownloaded, source);
1122 << utils::ToString(source) << " = "
1123 << GetCurrentBytesDownloaded(source);
1126 void PayloadState::LoadTotalBytesDownloaded(DownloadSource source) {
1127 string key = GetPrefsKey(kPrefsTotalBytesDownloaded, source);
1128 SetTotalBytesDownloaded(source, GetPersistedValue(key), true);
1132 DownloadSource source,
1137 if (source >= kNumDownloadSources)
1141 total_bytes_downloaded_[source] = total_bytes_downloaded;
1144 string prefs_key = GetPrefsKey(kPrefsTotalBytesDownloaded, source);
1147 << utils::ToString(source) << " = "
1148 << GetTotalBytesDownloaded(source);