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

Side by Side Diff: libcurl_http_fetcher.h

Issue 6516026: AU: Make proxy resolution asynchronous. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fix utils.* include paths Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « http_fetcher_unittest.cc ('k') | libcurl_http_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_LIBCURL_HTTP_FETCHER_H__ 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_LIBCURL_HTTP_FETCHER_H__
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_LIBCURL_HTTP_FETCHER_H__ 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_LIBCURL_HTTP_FETCHER_H__
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <curl/curl.h> 10 #include <curl/curl.h>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 force_connection_type_ = true; 84 force_connection_type_ = true;
85 forced_expensive_connection_ = is_expensive; 85 forced_expensive_connection_ = is_expensive;
86 } 86 }
87 87
88 void SetBuildType(bool is_official) { 88 void SetBuildType(bool is_official) {
89 force_build_type_ = true; 89 force_build_type_ = true;
90 forced_official_build_ = is_official; 90 forced_official_build_ = is_official;
91 } 91 }
92 92
93 private: 93 private:
94 // Callback for when proxy resolution has completed. This begins the
95 // transfer.
96 void ProxiesResolved();
97
94 // Asks libcurl for the http response code and stores it in the object. 98 // Asks libcurl for the http response code and stores it in the object.
95 void GetHttpResponseCode(); 99 void GetHttpResponseCode();
96 100
97 // Resumes a transfer where it left off. This will use the 101 // Resumes a transfer where it left off. This will use the
98 // HTTP Range: header to make a new connection from where the last 102 // HTTP Range: header to make a new connection from where the last
99 // left off. 103 // left off.
100 virtual void ResumeTransfer(const std::string& url); 104 virtual void ResumeTransfer(const std::string& url);
101 105
102 // These two methods are for glib main loop callbacks. They are called 106 // These two methods are for glib main loop callbacks. They are called
103 // when either a file descriptor is ready for work or when a timer 107 // when either a file descriptor is ready for work or when a timer
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // We can't clean everything up while we're in a write callback, so 222 // We can't clean everything up while we're in a write callback, so
219 // if we get a terminate request, queue it until we can handle it. 223 // if we get a terminate request, queue it until we can handle it.
220 bool terminate_requested_; 224 bool terminate_requested_;
221 225
222 DISALLOW_COPY_AND_ASSIGN(LibcurlHttpFetcher); 226 DISALLOW_COPY_AND_ASSIGN(LibcurlHttpFetcher);
223 }; 227 };
224 228
225 } // namespace chromeos_update_engine 229 } // namespace chromeos_update_engine
226 230
227 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_LIBCURL_HTTP_FETCHER_H__ 231 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_LIBCURL_HTTP_FETCHER_H__
OLDNEW
« 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