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

Unified Diff: chrome/browser/ui/tab_contents/core_tab_helper.cc

Issue 2038233002: Using ResourceRequestBody as the type of HTTP body outside of //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make-resource-request-body-public
Patch Set: Rebasing... Created 4 years, 6 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: chrome/browser/ui/tab_contents/core_tab_helper.cc
diff --git a/chrome/browser/ui/tab_contents/core_tab_helper.cc b/chrome/browser/ui/tab_contents/core_tab_helper.cc
index df57665f89971bd2573a71a5fbf4c0ec2270da42..94b92acdcd6d943b0c018d297ba8827109153d89 100644
--- a/chrome/browser/ui/tab_contents/core_tab_helper.cc
+++ b/chrome/browser/ui/tab_contents/core_tab_helper.cc
@@ -350,12 +350,12 @@ void CoreTabHelper::DoSearchByImageInNewTab(const GURL& src_url,
result, content::Referrer(), NEW_FOREGROUND_TAB,
ui::PAGE_TRANSITION_LINK, false);
const std::string& content_type = post_content.first;
- std::string* post_data = &post_content.second;
- if (!post_data->empty()) {
+ const std::string& post_data = post_content.second;
+ if (!post_data.empty()) {
DCHECK(!content_type.empty());
open_url_params.uses_post = true;
- open_url_params.browser_initiated_post_data =
- base::RefCountedString::TakeString(post_data);
+ open_url_params.post_data =
+ content::ResourceRequestBody::CreateFromBytes(post_data);
open_url_params.extra_headers += base::StringPrintf(
"%s: %s\r\n", net::HttpRequestHeaders::kContentType,
content_type.c_str());

Powered by Google App Engine
This is Rietveld 408576698