Commit bd6af69b authored by Hiroki Nakagawa's avatar Hiroki Nakagawa Committed by Commit Bot

Worker: Rename WorkerGlobalScope::LoadingScriptFrom*() to LoadScriptFrom*()

This CL renames functions to match with the coding standard.

Bug: n/a
Change-Id: Ic6eddf1b16f4415740c238beba10304691be9bc0
Reviewed-on: https://chromium-review.googlesource.com/966161Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543963}
parent f6e0efb9
......@@ -161,13 +161,13 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls,
String source_code;
std::unique_ptr<Vector<char>> cached_meta_data;
LoadResult result = LoadResult::kNotHandled;
result = LoadingScriptFromInstalledScriptsManager(
result = LoadScriptFromInstalledScriptsManager(
complete_url, &response_url, &source_code, &cached_meta_data);
// If the script wasn't provided by the InstalledScriptsManager, load from
// ResourceLoader.
if (result == LoadResult::kNotHandled) {
result = LoadingScriptFromClassicScriptLoader(
result = LoadScriptFromClassicScriptLoader(
complete_url, &response_url, &source_code, &cached_meta_data);
}
......@@ -197,7 +197,7 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls,
}
WorkerGlobalScope::LoadResult
WorkerGlobalScope::LoadingScriptFromInstalledScriptsManager(
WorkerGlobalScope::LoadScriptFromInstalledScriptsManager(
const KURL& script_url,
KURL* out_response_url,
String* out_source_code,
......@@ -227,7 +227,7 @@ WorkerGlobalScope::LoadingScriptFromInstalledScriptsManager(
}
WorkerGlobalScope::LoadResult
WorkerGlobalScope::LoadingScriptFromClassicScriptLoader(
WorkerGlobalScope::LoadScriptFromClassicScriptLoader(
const KURL& script_url,
KURL* out_response_url,
String* out_source_code,
......
......@@ -169,17 +169,18 @@ class CORE_EXPORT WorkerGlobalScope
// received. If the script load could not be handled by the
// InstalledScriptsManager, e.g. when the script was not an installed script,
// returns LoadResult::kNotHandled.
// TODO(crbug.com/753350): Factor out LoadingScriptFrom* into a new class
// which provides the worker's scripts.
LoadResult LoadingScriptFromInstalledScriptsManager(
// TODO(crbug.com/753350): Factor out LoadScriptFrom* into a new class which
// provides the worker's scripts.
LoadResult LoadScriptFromInstalledScriptsManager(
const KURL& script_url,
KURL* out_response_url,
String* out_source_code,
std::unique_ptr<Vector<char>>* out_cached_meta_data);
// Tries to load the script synchronously from the WorkerClassicScriptLoader,
// which requests the script from the browser. This blocks until the script is
// received.
LoadResult LoadingScriptFromClassicScriptLoader(
LoadResult LoadScriptFromClassicScriptLoader(
const KURL& script_url,
KURL* out_response_url,
String* out_source_code,
......
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