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