summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/loader/importance_attribute.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/loader/importance_attribute.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/loader/importance_attribute.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/loader/importance_attribute.cc b/chromium/third_party/blink/renderer/core/loader/importance_attribute.cc
new file mode 100644
index 00000000000..d2a836df313
--- /dev/null
+++ b/chromium/third_party/blink/renderer/core/loader/importance_attribute.cc
@@ -0,0 +1,18 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/renderer/core/loader/importance_attribute.h"
+
+namespace blink {
+
+mojom::FetchImportanceMode GetFetchImportanceAttributeValue(
+ const String& value) {
+ if (EqualIgnoringASCIICase(value, "low"))
+ return mojom::FetchImportanceMode::kImportanceLow;
+ if (EqualIgnoringASCIICase(value, "high"))
+ return mojom::FetchImportanceMode::kImportanceHigh;
+ return mojom::FetchImportanceMode::kImportanceAuto;
+}
+
+} // namespace blink