summaryrefslogtreecommitdiff
path: root/test_http_server.cc
diff options
context:
space:
mode:
authorAlex Vakulenko <avakulenko@chromium.org>2014-03-25 12:36:28 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-03-27 18:45:11 +0000
commit75039d7397f03dff77bdf4e26398049ff88edc4c (patch)
treea1403721dd45f801d8d95bbbcc612a71bdbb4483 /test_http_server.cc
parent032e772f76a6cd0b4caf1af7bd02dd81af2dc7dd (diff)
update_engine: update to libbase 242728
Made update_engine link with libchrome-242728 and fixed compile issues due to changes in namespaces and include file layout. Also removed some of suppressed compiler warnings and fixed the issues masked by them (e.g. mismatched printf-like specifiers). Added -Wextra compiler option to enable additional useful warnings to ensure more strict checking... Had to disable "unused-parameter" though since we have a lot of functions (mainly in fakes) that do not use all of their parameters. BUG=chromium:351593 TEST=Unit tests passed. CQ-DEPEND=CL:191721 Change-Id: I1aa63a48d5f1f4ea75ba6b00aec7aa5f3bad15c4 Reviewed-on: https://chromium-review.googlesource.com/191510 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Diffstat (limited to 'test_http_server.cc')
-rw-r--r--test_http_server.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/test_http_server.cc b/test_http_server.cc
index 92904ad6..a94f5542 100644
--- a/test_http_server.cc
+++ b/test_http_server.cc
@@ -29,9 +29,9 @@
#include <vector>
#include <base/logging.h>
-#include <base/string_split.h>
-#include <base/string_util.h>
-#include <base/stringprintf.h>
+#include <base/strings/string_split.h>
+#include <base/strings/string_util.h>
+#include <base/strings/stringprintf.h>
#include "update_engine/http_common.h"
@@ -115,11 +115,12 @@ bool ParseRequest(int fd, HttpRequest* request) {
if (range.find('-') < range.length() - 1)
request->end_offset = atoll(range.c_str() + range.find('-') + 1) + 1;
request->return_code = kHttpResponsePartialContent;
- std::string tmp_str = StringPrintf("decoded range offsets: start=%jd "
- "end=", request->start_offset);
+ std::string tmp_str = base::StringPrintf("decoded range offsets: "
+ "start=%jd end=",
+ (intmax_t)request->start_offset);
if (request->end_offset > 0)
base::StringAppendF(&tmp_str, "%jd (non-inclusive)",
- request->end_offset);
+ (intmax_t)request->end_offset);
else
base::StringAppendF(&tmp_str, "unspecified");
LOG(INFO) << tmp_str;
@@ -591,7 +592,7 @@ int main(int argc, char** argv) {
// unit tests, avoid unilateral changes; (b) it is necessary to flush/sync the
// file to prevent the spawning process from waiting indefinitely for this
// message.
- string listening_msg = StringPrintf("%s%hu", kListeningMsgPrefix, port);
+ string listening_msg = base::StringPrintf("%s%hu", kListeningMsgPrefix, port);
LOG(INFO) << listening_msg;
CHECK_EQ(write(report_fd, listening_msg.c_str(), listening_msg.length()),
static_cast<int>(listening_msg.length()));