Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Unified Diff: third_party/WebKit/Source/modules/fetch/Body.h

Issue 1446963002: CREDENTIAL: Teach Fetch to handle PasswordCredential objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@opaque
Patch Set: Better Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/Body.h
diff --git a/third_party/WebKit/Source/modules/fetch/Body.h b/third_party/WebKit/Source/modules/fetch/Body.h
index 1e9ee5374eb14ee5d5a8cdba5b51b8c763dc7da7..6d7bdf6c7ca748a4bfd7e33f817dab477ec8e9d0 100644
--- a/third_party/WebKit/Source/modules/fetch/Body.h
+++ b/third_party/WebKit/Source/modules/fetch/Body.h
@@ -8,6 +8,7 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/ActiveDOMObject.h"
+#include "core/dom/DOMException.h"
horo 2015/11/18 05:14:09 remove
#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
#include "wtf/text/WTFString.h"
@@ -50,10 +51,21 @@ public:
ActiveDOMObject::trace(visitor);
}
+ // https://w3c.github.io/webappsec-credential-management/#monkey-patching-fetch-2
+ void setOpaque() { m_opaque = true; }
+ bool opaque() const { return m_opaque; }
+
private:
virtual String mimeType() const = 0;
+ // Body consumption algorithms will reject with a TypeError in a number of error
+ // conditions. This method wraps those up into one call which returns an empty
+ // ScriptPromise if the consumption may proceed, and a ScriptPromise rejected with
+ // a TypeError if it ought to be blocked.
+ ScriptPromise rejectInvalidConsumption(ScriptState*);
+
bool m_bodyPassed;
+ bool m_opaque;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698