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

Unified Diff: libcurl_http_fetcher.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 | « http_fetcher_unittest.cc ('k') | libcurl_http_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libcurl_http_fetcher.h
diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
index 3a50bda46e7ae2ce365f3661f926bc2cb4f2200f..b3ba518d5f6e865b447f5a08f7361e8f74844527 100644
--- a/libcurl_http_fetcher.h
+++ b/libcurl_http_fetcher.h
@@ -48,8 +48,8 @@ class LibcurlHttpFetcher : public HttpFetcher {
// Begins the transfer if it hasn't already begun.
virtual void BeginTransfer(const std::string& url);
- // If the transfer is in progress, aborts the transfer early.
- // The transfer cannot be resumed.
+ // If the transfer is in progress, aborts the transfer early. The transfer
+ // cannot be resumed.
virtual void TerminateTransfer();
// Suspend the transfer by calling curl_easy_pause(CURLPAUSE_ALL).
@@ -136,6 +136,11 @@ class LibcurlHttpFetcher : public HttpFetcher {
// curl(m) handles, io_channels_, timeout_source_.
void CleanUp();
+ // Force terminate the transfer. This will invoke the delegate's (if any)
+ // TransferTerminated callback so, after returning, this fetcher instance may
+ // be destroyed.
+ void ForceTransferTermination();
+
// Returns whether or not the current network connection is considered
// expensive.
bool ConnectionIsExpensive() const;
« no previous file with comments | « http_fetcher_unittest.cc ('k') | libcurl_http_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698