summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-08-30 10:22:43 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-08-30 12:36:28 +0000
commit271a6c3487a14599023a9106329505597638d793 (patch)
treee040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h
parent7b2ffa587235a47d4094787d72f38102089f402a (diff)
downloadqtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h')
-rw-r--r--chromium/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/chromium/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h b/chromium/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h
index 2920c71e2b5..a2e943eb8d2 100644
--- a/chromium/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h
+++ b/chromium/third_party/blink/renderer/core/loader/modulescript/module_script_creation_params.h
@@ -8,10 +8,10 @@
#include "base/optional.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/renderer/platform/bindings/parkable_string.h"
-#include "third_party/blink/renderer/platform/cross_thread_copier.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/loader/fetch/cached_metadata_handler.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
+#include "third_party/blink/renderer/platform/wtf/cross_thread_copier.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
@@ -21,17 +21,16 @@ class ModuleScriptCreationParams {
DISALLOW_NEW();
public:
- ModuleScriptCreationParams(
- const KURL& response_url,
- const ParkableString& source_text,
- SingleCachedMetadataHandler* cache_handler,
- network::mojom::FetchCredentialsMode fetch_credentials_mode)
+ ModuleScriptCreationParams(const KURL& response_url,
+ const ParkableString& source_text,
+ SingleCachedMetadataHandler* cache_handler,
+ network::mojom::CredentialsMode credentials_mode)
: response_url_(response_url),
is_isolated_(false),
source_text_(source_text),
isolated_source_text_(),
cache_handler_(cache_handler),
- fetch_credentials_mode_(fetch_credentials_mode) {}
+ credentials_mode_(credentials_mode) {}
~ModuleScriptCreationParams() = default;
@@ -54,8 +53,8 @@ class ModuleScriptCreationParams {
return source_text_;
}
SingleCachedMetadataHandler* CacheHandler() const { return cache_handler_; }
- network::mojom::FetchCredentialsMode GetFetchCredentialsMode() const {
- return fetch_credentials_mode_;
+ network::mojom::CredentialsMode GetFetchCredentialsMode() const {
+ return credentials_mode_;
}
bool IsSafeToSendToAnotherThread() const {
@@ -64,15 +63,14 @@ class ModuleScriptCreationParams {
private:
// Creates an isolated copy.
- ModuleScriptCreationParams(
- const KURL& response_url,
- const String& isolated_source_text,
- network::mojom::FetchCredentialsMode fetch_credentials_mode)
+ ModuleScriptCreationParams(const KURL& response_url,
+ const String& isolated_source_text,
+ network::mojom::CredentialsMode credentials_mode)
: response_url_(response_url),
is_isolated_(true),
source_text_(),
isolated_source_text_(isolated_source_text),
- fetch_credentials_mode_(fetch_credentials_mode) {}
+ credentials_mode_(credentials_mode) {}
const KURL response_url_;
@@ -85,19 +83,23 @@ class ModuleScriptCreationParams {
// |cache_handler_| is cleared when crossing thread boundaries.
Persistent<SingleCachedMetadataHandler> cache_handler_;
- const network::mojom::FetchCredentialsMode fetch_credentials_mode_;
+ const network::mojom::CredentialsMode credentials_mode_;
};
+} // namespace blink
+
+namespace WTF {
+
// Creates a deep copy because |response_url_| and |source_text_| are not
// cross-thread-transfer-safe.
template <>
-struct CrossThreadCopier<ModuleScriptCreationParams> {
- static ModuleScriptCreationParams Copy(
- const ModuleScriptCreationParams& params) {
+struct CrossThreadCopier<blink::ModuleScriptCreationParams> {
+ static blink::ModuleScriptCreationParams Copy(
+ const blink::ModuleScriptCreationParams& params) {
return params.IsolatedCopy();
}
};
-} // namespace blink
+} // namespace WTF
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_MODULESCRIPT_MODULE_SCRIPT_CREATION_PARAMS_H_