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

Unified Diff: chrome/browser/android/webapk/webapk_installer.cc

Issue 2436833002: Send POST request to update WebAPK instead of PUT request (Closed)
Patch Set: Created 4 years, 2 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/android/webapk/webapk_installer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/webapk/webapk_installer.cc
diff --git a/chrome/browser/android/webapk/webapk_installer.cc b/chrome/browser/android/webapk/webapk_installer.cc
index af357554a09af5fb0acf557c5bfcb1ce1cd16384..000f98c538baa5e75f3316ae58d3afc63064c3e3 100644
--- a/chrome/browser/android/webapk/webapk_installer.cc
+++ b/chrome/browser/android/webapk/webapk_installer.cc
@@ -343,7 +343,7 @@ void WebApkInstaller::OnGotIconMurmur2Hash(
void WebApkInstaller::SendCreateWebApkRequest(
std::unique_ptr<webapk::WebApk> webapk) {
- SendRequest(std::move(webapk), net::URLFetcher::POST, server_url_);
+ SendRequest(std::move(webapk), server_url_);
}
void WebApkInstaller::SendUpdateWebApkRequest(
@@ -351,18 +351,18 @@ void WebApkInstaller::SendUpdateWebApkRequest(
webapk->set_package_name(webapk_package_);
webapk->set_version(std::to_string(webapk_version_));
- SendRequest(std::move(webapk), net::URLFetcher::PUT, server_url_);
+ SendRequest(std::move(webapk), server_url_);
}
void WebApkInstaller::SendRequest(std::unique_ptr<webapk::WebApk> request_proto,
- net::URLFetcher::RequestType request_type,
const GURL& server_url) {
timer_.Start(
FROM_HERE,
base::TimeDelta::FromMilliseconds(webapk_download_url_timeout_ms_),
base::Bind(&WebApkInstaller::OnTimeout, weak_ptr_factory_.GetWeakPtr()));
- url_fetcher_ = net::URLFetcher::Create(server_url, request_type, this);
+ url_fetcher_ =
+ net::URLFetcher::Create(server_url, net::URLFetcher::POST, this);
url_fetcher_->SetRequestContext(request_context_getter_);
std::string serialized_request;
request_proto->SerializeToString(&serialized_request);
« no previous file with comments | « chrome/browser/android/webapk/webapk_installer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698