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

Unified Diff: http_fetcher.cc

Issue 5205002: AU: Manual proxy support (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: missed one fix for review 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.h ('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.cc
diff --git a/http_fetcher.cc b/http_fetcher.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5d006607c6e3697fc29db2edefe867581d9803bd
--- /dev/null
+++ b/http_fetcher.cc
@@ -0,0 +1,31 @@
+// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "update_engine/http_fetcher.h"
+
+using std::deque;
+using std::string;
+
+namespace chromeos_update_engine {
+
+void HttpFetcher::SetPostData(const void* data, size_t size) {
+ post_data_set_ = true;
+ post_data_.clear();
+ const char *char_data = reinterpret_cast<const char*>(data);
+ post_data_.insert(post_data_.end(), char_data, char_data + size);
+}
+
+// Proxy methods to set the proxies, then to pop them off.
+void HttpFetcher::ResolveProxiesForUrl(const string& url) {
+ if (!proxy_resolver_) {
+ LOG(INFO) << "Not resolving proxies (no proxy resolver).";
+ return;
+ }
+ deque<string> proxies;
+ if (proxy_resolver_->GetProxiesForUrl(url, &proxies)) {
+ SetProxies(proxies);
+ }
+}
+
+} // namespace chromeos_update_engine
« no previous file with comments | « http_fetcher.h ('k') | http_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698