Commit 97fd96de authored by Rayan Kanso's avatar Rayan Kanso Committed by Commit Bot

[WebAPK] Remove the server URL from public chromium

Tested by running chrome_apk and chrome_public_apk

Bug: 1045009, 911900
Change-Id: Ib6803cfc0668967efdaac147e4d3c3269634c6f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2126929Reviewed-by: default avatarYusuf Ozuysal <yusufo@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757004}
parent 2298d0da
......@@ -375,6 +375,6 @@ public abstract class AppHooks {
* Returns the URL to the WebAPK creation/update server.
*/
public String getWebApkServerUrl() {
return "https://webapk.googleapis.com/v1/webApks/?alt=proto&key=AIzaSyAoI6v-F31-3t9NunLYEiKcPIqgTJIUZBw";
return "";
}
}
......@@ -538,6 +538,11 @@ void WebApkInstaller::InstallAsync(const ShortcutInfo& shortcut_info,
finish_callback_ = std::move(finish_callback);
task_type_ = INSTALL;
if (!server_url_.is_valid()) {
OnResult(WebApkInstallResult::FAILURE);
return;
}
CheckFreeSpace();
}
......@@ -574,6 +579,11 @@ void WebApkInstaller::UpdateAsync(const base::FilePath& update_request_path,
finish_callback_ = std::move(finish_callback);
task_type_ = UPDATE;
if (!server_url_.is_valid()) {
OnResult(WebApkInstallResult::FAILURE);
return;
}
base::PostTaskAndReplyWithResult(
GetBackgroundTaskRunner().get(), FROM_HERE,
base::BindOnce(&ReadFileInBackground, update_request_path),
......@@ -692,6 +702,8 @@ void WebApkInstaller::OnGotIconMurmur2Hashes(
void WebApkInstaller::SendRequest(
std::unique_ptr<std::string> serialized_proto) {
DCHECK(server_url_.is_valid());
timer_.Start(
FROM_HERE, base::TimeDelta::FromMilliseconds(webapk_server_timeout_ms_),
base::Bind(&WebApkInstaller::OnResult, weak_ptr_factory_.GetWeakPtr(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment