#include "chrome/browser/web_share_target/target_util.h"
#include <sstream>
#include <utility>
#include "base/files/file_path.h"
#include "base/strings/escape.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "net/base/mime_util.h"
#include "services/network/public/cpp/resource_request_body.h"
namespace {
void AddFile(const std::string& value_name,
const std::string& file_uri,
const std::string& file_name,
const std::string& content_type,
const std::string& boundary,
scoped_refptr<network::ResourceRequestBody> request_body) { … }
void AddPlainText(const std::string& value_name,
const std::string& value,
const std::string& file_name,
const std::string& content_type,
const std::string& boundary,
scoped_refptr<network::ResourceRequestBody> request_body) { … }
}
namespace web_share_target {
std::string PercentEscapeString(const std::string& unescaped_string) { … }
scoped_refptr<network::ResourceRequestBody> ComputeMultipartBody(
const std::vector<std::string>& names,
const std::vector<std::string>& values,
const std::vector<bool>& is_value_file_uris,
const std::vector<std::string>& filenames,
const std::vector<std::string>& types,
const std::string& boundary) { … }
std::string ComputeUrlEncodedBody(const std::vector<std::string>& names,
const std::vector<std::string>& values) { … }
}