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

Unified Diff: components/search_engines/template_url.cc

Issue 1547593002: Introducing a net::GenerateMimeMultipartBoundary helper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: components/search_engines/template_url.cc
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
index b5baebed16dc8367e6b4c6abfc06c6e2d7a41663..cb8b039ab7065dd8ea6a85e01f3ec6a3745be880 100644
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -279,12 +279,9 @@ bool TemplateURLRef::EncodeFormData(const PostParams& post_params,
return false;
const char kUploadDataMIMEType[] = "multipart/form-data; boundary=";
- const char kMultipartBoundary[] = "----+*+----%016" PRIx64 "----+*+----";
// Each name/value pair is stored in a body part which is preceded by a
- // boundary delimiter line. Uses random number generator here to create
- // a unique boundary delimiter for form data encoding.
- std::string boundary = base::StringPrintf(kMultipartBoundary,
- base::RandUint64());
+ // boundary delimiter line.
+ std::string boundary = net::GenerateMimeMultipartBoundary();
// Sets the content MIME type.
post_content->first = kUploadDataMIMEType;
post_content->first += boundary;

Powered by Google App Engine
This is Rietveld 408576698