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

Side by Side Diff: tools/OmahaCompatibility/HttpServer/response.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2008-2009 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 // ========================================================================
15
16 #ifndef OMAHA_TOOLS_SRC_OMAHACOMPATIBILITY_HTTPSERVER_RESPONSE_H_
17 #define OMAHA_TOOLS_SRC_OMAHACOMPATIBILITY_HTTPSERVER_RESPONSE_H_
18
19 #include <http.h>
20 #include <winhttp.h>
21 #include "omaha/tools/omahacompatibility/httpserver/request.h"
22
23 namespace omaha {
24
25 // This class contains the result of the processing.
26 // For update responses it contains the response to the post in the
27 // string and for downloads it contains the filename and the size.
28 // TODO(omaha): Remove the size and filename from here and make this,
29 // class derivable. This will allow the http_server to not deal with
30 // the specifics of either a download or update check response.
31 class HttpResponse {
32 public:
33 explicit HttpResponse(const HttpRequest& request) : request_(request) {}
34 ~HttpResponse() {}
35
36 CString response_str() const { return response_str_; }
37 void set_response_str(const CString& response_str) {
38 response_str_ = response_str;
39 }
40 const HttpRequest& request() const { return request_; }
41
42 int size() const { return size_; }
43 void set_size(int size) { size_ = size; }
44
45 CString file_name() const { return file_name_; }
46 void set_file_name(const CString& filename) { file_name_ = filename; }
47
48 private:
49 HttpRequest request_;
50 CString response_str_;
51
52 // This is used for the download responses.
53 int size_;
54 CString file_name_;
55 };
56
57 } // namespace omaha
58
59 #endif // OMAHA_TOOLS_SRC_OMAHACOMPATIBILITY_HTTPSERVER_RESPONSE_H_
OLDNEW
« no previous file with comments | « tools/OmahaCompatibility/HttpServer/http_server.cc ('k') | tools/OmahaCompatibility/HttpServer/update_check_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698