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

Unified Diff: http_fetcher.h

Issue 5835004: AU: MultiHttpFetcher cleanup/rewrite (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fixes for review/merge latest trunk Created 10 years 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 | « SConstruct ('k') | http_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: http_fetcher.h
diff --git a/http_fetcher.h b/http_fetcher.h
index a50c760f35aa519f27b0986193c148b8fc3a33bd..e4f791a13a18184165e0fe4bdb2d82b04975659c 100644
--- a/http_fetcher.h
+++ b/http_fetcher.h
@@ -86,6 +86,12 @@ class HttpFetcher {
virtual void set_idle_seconds(int seconds) {}
virtual void set_retry_seconds(int seconds) {}
+ ProxyResolver* proxy_resolver() const { return proxy_resolver_; }
+
+ // These are used for testing:
+ virtual void SetConnectionAsExpensive(bool is_expensive) {}
+ virtual void SetBuildType(bool is_official) {}
+
protected:
// The URL we're actively fetching from
std::string url_;
@@ -122,13 +128,11 @@ class HttpFetcherDelegate {
// Called if the fetcher seeks to a particular offset.
virtual void SeekToOffset(off_t offset) {}
- // Called when the transfer has completed successfully or been aborted through
- // means other than TerminateTransfer. It's OK to destroy the |fetcher| object
- // in this callback.
+ // When a transfer has completed, exactly one of these two methods will be
+ // called. TransferTerminated is called when the transfer has been aborted
+ // through TerminateTransfer. TransferComplete is called in all other
+ // situations. It's OK to destroy the |fetcher| object in this callback.
virtual void TransferComplete(HttpFetcher* fetcher, bool successful) = 0;
-
- // Called when the transfer has been aborted through TerminateTransfer. It's
- // OK to destroy the |fetcher| object in this callback.
virtual void TransferTerminated(HttpFetcher* fetcher) {}
};
« no previous file with comments | « SConstruct ('k') | http_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698