Commit a8dec387 authored by Tsuyoshi Horo's avatar Tsuyoshi Horo Committed by Commit Bot

Rename INVALID_BUNDLED_EXCHANGES to INVALID_WEB_BUNDLE

Bug: 1026147
Change-Id: I059799f7055c9eca1e6605838b061a7ca46c57cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1930354Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
Reviewed-by: default avatarKunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718602}
parent ae15405a
......@@ -398,7 +398,7 @@ IN_PROC_BROWSER_TEST_F(WebBundleTrustableFileNotFoundBrowserTest, NotFound) {
EXPECT_FALSE(NavigateToURL(web_contents, test_data_url()));
run_loop.Run();
ASSERT_TRUE(finish_navigation_observer.error_code());
EXPECT_EQ(net::ERR_INVALID_BUNDLED_EXCHANGES,
EXPECT_EQ(net::ERR_INVALID_WEB_BUNDLE,
*finish_navigation_observer.error_code());
if (console_delegate.messages().empty())
console_delegate.Wait();
......@@ -519,7 +519,7 @@ IN_PROC_BROWSER_TEST_P(WebBundleFileBrowserTest, InvalidWebBundleFile) {
EXPECT_FALSE(NavigateToURL(web_contents, test_data_url));
run_loop.Run();
ASSERT_TRUE(finish_navigation_observer.error_code());
EXPECT_EQ(net::ERR_INVALID_BUNDLED_EXCHANGES,
EXPECT_EQ(net::ERR_INVALID_WEB_BUNDLE,
*finish_navigation_observer.error_code());
if (console_delegate.messages().empty())
......@@ -545,7 +545,7 @@ IN_PROC_BROWSER_TEST_P(WebBundleFileBrowserTest,
EXPECT_FALSE(NavigateToURL(web_contents, test_data_url));
run_loop.Run();
ASSERT_TRUE(finish_navigation_observer.error_code());
EXPECT_EQ(net::ERR_INVALID_BUNDLED_EXCHANGES,
EXPECT_EQ(net::ERR_INVALID_WEB_BUNDLE,
*finish_navigation_observer.error_code());
if (console_delegate.messages().empty())
......@@ -676,7 +676,7 @@ class WebBundleNetworkBrowserTest : public WebBundleBrowserTestBase {
EXPECT_FALSE(NavigateToURL(web_contents, url));
run_loop.Run();
ASSERT_TRUE(finish_navigation_observer.error_code());
EXPECT_EQ(net::ERR_INVALID_BUNDLED_EXCHANGES,
EXPECT_EQ(net::ERR_INVALID_WEB_BUNDLE,
*finish_navigation_observer.error_code());
if (console_delegate.messages().empty())
console_delegate.Wait();
......
......@@ -218,8 +218,8 @@ class InterceptorForFile final : public NavigationLoaderInterceptor {
AddMetadataParseErrorMessageToConsole(frame_tree_node_id_,
metadata_error);
std::move(forwarding_client_)
->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return;
}
DCHECK(reader_);
......@@ -273,7 +273,7 @@ class InterceptorForFile final : public NavigationLoaderInterceptor {
// - If OnMetadataReady() has not been called yet:
// Wait for OnMetadataReady() to be called.
// - If OnMetadataReady() was called with an error:
// Completes the request with ERR_INVALID_BUNDLED_EXCHANGES.
// Completes the request with ERR_INVALID_WEB_BUNDLE.
// - If OnMetadataReady() was called whthout errors:
// A redirect loader is created to redirect the navigation request to
// the Bundle's primary URL ("https://example.com/a.html").
......@@ -315,8 +315,8 @@ class InterceptorForTrustableFile final : public NavigationLoaderInterceptor {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (metadata_error_) {
mojo::Remote<network::mojom::URLLoaderClient>(std::move(client))
->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return;
}
......@@ -403,7 +403,7 @@ class InterceptorForTrustableFile final : public NavigationLoaderInterceptor {
// Content-Disposition header is set, returns false.
// - If the URL isn't HTTPS nor localhost HTTP, or the Content-Length header
// is not a positive value, completes the requests with
// ERR_INVALID_BUNDLED_EXCHANGES and returns true.
// ERR_INVALID_WEB_BUNDLE and returns true.
// - Otherwise starts reading the metadata and returns true. Once the
// metadata is read, OnMetadataReady() is called, and a redirect loader is
// created to redirect the navigation request to the Bundle's primary URL
......@@ -467,8 +467,8 @@ class InterceptorForNetwork final : public NavigationLoaderInterceptor {
"Web Bundle response must be served from HTTPS or localhost HTTP.");
*client_receiver = forwarding_client_.BindNewPipeAndPassReceiver();
std::move(forwarding_client_)
->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return true;
}
......@@ -478,8 +478,8 @@ class InterceptorForNetwork final : public NavigationLoaderInterceptor {
"Web Bundle response must have valid Content-Length header.");
*client_receiver = forwarding_client_.BindNewPipeAndPassReceiver();
std::move(forwarding_client_)
->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return true;
}
......@@ -502,8 +502,8 @@ class InterceptorForNetwork final : public NavigationLoaderInterceptor {
if (error) {
AddMetadataParseErrorMessageToConsole(frame_tree_node_id_, error);
std::move(forwarding_client_)
->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return;
}
primary_url_ = reader_->GetPrimaryURL();
......@@ -512,8 +512,8 @@ class InterceptorForNetwork final : public NavigationLoaderInterceptor {
frame_tree_node_id_,
"The primary URL resource is not found in the web bundle.");
std::move(forwarding_client_)
->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return;
}
......@@ -524,8 +524,8 @@ class InterceptorForNetwork final : public NavigationLoaderInterceptor {
"The origin of primary URL doesn't match with "
"the origin of the web bundle.");
std::move(forwarding_client_)
->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return;
}
url_loader_factory_ = std::make_unique<WebBundleURLLoaderFactory>(
......@@ -720,7 +720,7 @@ class InterceptorForTrackedNavigationFromFile final
// - If OnMetadataReady() has not been called yet:
// Wait for OnMetadataReady() to be called.
// - If OnMetadataReady() was called with an error:
// Completes the request with ERR_INVALID_BUNDLED_EXCHANGES.
// Completes the request with ERR_INVALID_WEB_BUNDLE.
// - If OnMetadataReady() was called whthout errors:
// Creates the loader for the main resource.
class InterceptorForNavigationInfo final : public NavigationLoaderInterceptor {
......@@ -761,8 +761,8 @@ class InterceptorForNavigationInfo final : public NavigationLoaderInterceptor {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (metadata_error_) {
mojo::Remote<network::mojom::URLLoaderClient>(std::move(client))
->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return;
}
......
......@@ -125,8 +125,8 @@ class WebBundleURLLoaderFactory::EntryLoader final
if (!response || response->response_code != net::HTTP_OK) {
if (error)
AddResponseParseErrorMessageToConsole(frame_tree_node_id_, error);
loader_client_->OnComplete(network::URLLoaderCompletionStatus(
net::ERR_INVALID_BUNDLED_EXCHANGES));
loader_client_->OnComplete(
network::URLLoaderCompletionStatus(net::ERR_INVALID_WEB_BUNDLE));
return;
}
......
......@@ -233,7 +233,7 @@ TEST_F(WebBundleURLLoaderFactoryTest,
TEST_F(WebBundleURLLoaderFactoryTest, CreateEntryLoaderAndFailToReadResponse) {
auto loader = CreateLoaderAndStart(/*response=*/nullptr);
RunAndCheckFailure(net::ERR_INVALID_BUNDLED_EXCHANGES);
RunAndCheckFailure(net::ERR_INVALID_WEB_BUNDLE);
}
TEST_F(WebBundleURLLoaderFactoryTest, CreateLoaderForPost) {
......
......@@ -854,8 +854,8 @@ NET_ERROR(ADD_USER_CERT_FAILED, -503)
// An error occurred while handling a signed exchange.
NET_ERROR(INVALID_SIGNED_EXCHANGE, -504)
// An error occurred while handling a bundled-exchanges source.
NET_ERROR(INVALID_BUNDLED_EXCHANGES, -505)
// An error occurred while handling a Web Bundle source.
NET_ERROR(INVALID_WEB_BUNDLE, -505)
// *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). ***
......
......@@ -9447,7 +9447,7 @@ Called by update_net_error_codes.py.-->
<int value="-603" label="FTP_TRANSFER_ABORTED"/>
<int value="-602" label="FTP_SERVICE_UNAVAILABLE"/>
<int value="-601" label="FTP_FAILED"/>
<int value="-505" label="INVALID_BUNDLED_EXCHANGES"/>
<int value="-505" label="INVALID_WEB_BUNDLE"/>
<int value="-504" label="INVALID_SIGNED_EXCHANGE"/>
<int value="-503" label="ADD_USER_CERT_FAILED"/>
<int value="-502" label="NO_PRIVATE_KEY_FOR_CERT"/>
......@@ -43126,7 +43126,7 @@ Called by update_net_error_codes.py.-->
<int value="502" label="NO_PRIVATE_KEY_FOR_CERT"/>
<int value="503" label="ADD_USER_CERT_FAILED"/>
<int value="504" label="INVALID_SIGNED_EXCHANGE"/>
<int value="505" label="INVALID_BUNDLED_EXCHANGES"/>
<int value="505" label="INVALID_WEB_BUNDLE"/>
<int value="601" label="FTP_FAILED"/>
<int value="602" label="FTP_SERVICE_UNAVAILABLE"/>
<int value="603" label="FTP_TRANSFER_ABORTED"/>
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