From 6de969a3040fa31ba60302c66613d1d2e6f5a730 Mon Sep 17 00:00:00 2001 From: "ivan.penkov@gmail.com" Date: Thu, 28 Jun 2012 22:46:01 +0000 Subject: This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/linux/libcurl_wrapper.cc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/common/linux/libcurl_wrapper.cc') diff --git a/src/common/linux/libcurl_wrapper.cc b/src/common/linux/libcurl_wrapper.cc index 8b61aa09..08307f02 100644 --- a/src/common/linux/libcurl_wrapper.cc +++ b/src/common/linux/libcurl_wrapper.cc @@ -33,8 +33,7 @@ #include #include "common/linux/libcurl_wrapper.h" - -using std::string; +#include "common/using_std_string.h" namespace google_breakpad { LibcurlWrapper::LibcurlWrapper() @@ -58,8 +57,8 @@ LibcurlWrapper::LibcurlWrapper() return; } -bool LibcurlWrapper::SetProxy(const std::string& proxy_host, - const std::string& proxy_userpwd) { +bool LibcurlWrapper::SetProxy(const string& proxy_host, + const string& proxy_userpwd) { if (!init_ok_) { return false; } @@ -80,8 +79,8 @@ bool LibcurlWrapper::SetProxy(const std::string& proxy_host, return true; } -bool LibcurlWrapper::AddFile(const std::string& upload_file_path, - const std::string& basename) { +bool LibcurlWrapper::AddFile(const string& upload_file_path, + const string& basename) { if (!init_ok_) { return false; } @@ -101,17 +100,17 @@ static size_t WriteCallback(void *ptr, size_t size, if (!userp) return 0; - std::string *response = reinterpret_cast(userp); + string *response = reinterpret_cast(userp); size_t real_size = size * nmemb; response->append(reinterpret_cast(ptr), real_size); return real_size; } -bool LibcurlWrapper::SendRequest(const std::string& url, - const std::map& parameters, - std::string* server_response) { +bool LibcurlWrapper::SendRequest(const string& url, + const std::map& parameters, + string* server_response) { (*easy_setopt_)(curl_, CURLOPT_URL, url.c_str()); - std::map::const_iterator iter = parameters.begin(); + std::map::const_iterator iter = parameters.begin(); for (; iter != parameters.end(); ++iter) (*formadd_)(&formpost_, &lastptr_, CURLFORM_COPYNAME, iter->first.c_str(), -- cgit v1.2.1