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

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
« no previous file with comments | « chrome/browser/ui/browser_navigator_params.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..356a430b451af2105b5e4a2887f7936b0193e0f7 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.data(), post_data.size());
open_url_params.extra_headers += base::StringPrintf(
"%s: %s\r\n", net::HttpRequestHeaders::kContentType,
content_type.c_str());
« no previous file with comments | « chrome/browser/ui/browser_navigator_params.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698