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

Unified Diff: multi_http_fetcher.h

Issue 4004004: AU: Restrict to HTTPS for official builds. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 years, 2 months 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 | « libcurl_http_fetcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: multi_http_fetcher.h
diff --git a/multi_http_fetcher.h b/multi_http_fetcher.h
index 197234799e1d3d4259ec9f55eab76c29416f952e..43281990952ffa668cdd1574b51495c81dfffd39 100644
--- a/multi_http_fetcher.h
+++ b/multi_http_fetcher.h
@@ -73,8 +73,7 @@ class MultiHttpFetcher : public HttpFetcher, public HttpFetcherDelegate {
fetchers_[current_index_]->Unpause();
}
- // These two function are overloaded in LibcurlHttp fetcher to speed
- // testing.
+ // These functions are overloaded in LibcurlHttp fetcher for testing purposes.
void set_idle_seconds(int seconds) {
for (typename std::vector<std::tr1::shared_ptr<BaseHttpFetcher> >::iterator
it = fetchers_.begin(),
@@ -89,6 +88,20 @@ class MultiHttpFetcher : public HttpFetcher, public HttpFetcherDelegate {
(*it)->set_retry_seconds(seconds);
}
}
+ void SetConnectionAsExpensive(bool is_expensive) {
+ for (typename std::vector<std::tr1::shared_ptr<BaseHttpFetcher> >::iterator
+ it = fetchers_.begin(),
+ e = fetchers_.end(); it != e; ++it) {
+ (*it)->SetConnectionAsExpensive(is_expensive);
+ }
+ }
+ void SetBuildType(bool is_official) {
+ for (typename std::vector<std::tr1::shared_ptr<BaseHttpFetcher> >::iterator
+ it = fetchers_.begin(),
+ e = fetchers_.end(); it != e; ++it) {
+ (*it)->SetBuildType(is_official);
+ }
+ }
private:
void SendTransferComplete(HttpFetcher* fetcher, bool successful) {
@@ -173,7 +186,7 @@ class MultiHttpFetcher : public HttpFetcher, public HttpFetcherDelegate {
}
// If true, do not send any more data or TransferComplete to the delegate.
- bool sent_transfer_complete_;
+ bool sent_transfer_complete_;
RangesVect ranges_;
std::vector<std::tr1::shared_ptr<BaseHttpFetcher> > fetchers_;
« no previous file with comments | « libcurl_http_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698