Commit dae5a9bd authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix typos in web_bundle_utils.

Search and replace to spell "supported" correctly. Also fix lint errors
in modified files.

Change-Id: I4411bc2737f7ceb1b9cfa9c3316864d038a3afb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949022Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721271}
parent 7d912fcd
......@@ -4,6 +4,10 @@
#include "content/browser/web_package/web_bundle_handle.h"
#include <string>
#include <utility>
#include <vector>
#include "base/bind.h"
#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
......@@ -193,7 +197,7 @@ class InterceptorForFile final : public NavigationLoaderInterceptor {
bool* skip_other_interceptors,
bool* will_return_unsafe_redirect) override {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(web_bundle_utils::IsSupprtedFileScheme(request.url));
DCHECK(web_bundle_utils::IsSupportedFileScheme(request.url));
if ((*response_head)->mime_type !=
web_bundle_utils::kWebBundleFileMimeTypeWithoutParameters) {
return false;
......
......@@ -26,7 +26,7 @@ const base::FilePath::CharType kWebBundleFileExtension[] =
} // namespace
bool IsSupprtedFileScheme(const GURL& url) {
bool IsSupportedFileScheme(const GURL& url) {
if (url.SchemeIsFile())
return true;
#if defined(OS_ANDROID)
......@@ -39,7 +39,7 @@ bool IsSupprtedFileScheme(const GURL& url) {
bool CanLoadAsTrustableWebBundleFile(const GURL& url) {
if (!GetContentClient()->browser()->CanAcceptUntrustedExchangesIfNeeded())
return false;
if (!IsSupprtedFileScheme(url))
if (!IsSupportedFileScheme(url))
return false;
if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kTrustableWebBundleFileUrl)) {
......@@ -52,7 +52,7 @@ bool CanLoadAsTrustableWebBundleFile(const GURL& url) {
bool CanLoadAsWebBundleFile(const GURL& url) {
if (!base::FeatureList::IsEnabled(features::kWebBundles))
return false;
return IsSupprtedFileScheme(url);
return IsSupportedFileScheme(url);
}
bool CanLoadAsWebBundle(const GURL& url, const std::string& mime_type) {
......@@ -60,7 +60,7 @@ bool CanLoadAsWebBundle(const GURL& url, const std::string& mime_type) {
return false;
// Currently loading Web Bundle file from server response is not
// implemented yet.
if (!IsSupprtedFileScheme(url))
if (!IsSupportedFileScheme(url))
return false;
return mime_type == kWebBundleFileMimeTypeWithoutParameters;
}
......
......@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_WEB_PACKAGE_WEB_BUNDLE_UTILS_H_
#define CONTENT_BROWSER_WEB_PACKAGE_WEB_BUNDLE_UTILS_H_
#include <string>
#include "base/files/file_path.h"
#include "content/common/content_export.h"
......@@ -33,7 +35,7 @@ constexpr char kWebBundleFileMimeTypeWithoutParameters[] =
// On Android, returns true if the url scheme is file or content. On other
// platforms, returns true if the url scheme is file.
bool IsSupprtedFileScheme(const GURL& url);
bool IsSupportedFileScheme(const GURL& url);
// Returns true if |url| is the file URL which is specified with
// --trustable-bundled-exchanges-file-url flag. Always returns false when
......
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