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

Unified Diff: download_action.h

Issue 5009009: AU: Fix potential issues with premature destruction of HTTP fetchers. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: review comments Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | download_action.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: download_action.h
diff --git a/download_action.h b/download_action.h
index d0ac175f737d7c631558245addcee85a12c722f9..61067405513c7b42fa71cb8a7f05dbd398349205 100644
--- a/download_action.h
+++ b/download_action.h
@@ -88,6 +88,7 @@ class DownloadAction : public Action<DownloadAction>,
const char* bytes, int length);
virtual void SeekToOffset(off_t offset);
virtual void TransferComplete(HttpFetcher *fetcher, bool successful);
+ virtual void TransferTerminated(HttpFetcher *fetcher);
DownloadActionDelegate* delegate() const { return delegate_; }
void set_delegate(DownloadActionDelegate* delegate) {
@@ -124,6 +125,10 @@ class DownloadAction : public Action<DownloadAction>,
// Used to find the hash of the bytes downloaded
OmahaHashCalculator omaha_hash_calculator_;
+ // Used by TransferTerminated to figure if this action terminated itself or
+ // was terminated by the action processor.
+ ActionExitCode code_;
+
// For reporting status to outsiders
DownloadActionDelegate* delegate_;
uint64_t bytes_received_;
« no previous file with comments | « no previous file | download_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698