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

Unified Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp

Issue 2754683003: [NOT FOR COMMIT] Nested types CL 1 (Closed)
Patch Set: Created 3 years, 9 months 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/background_fetch/BackgroundFetchManager.cpp
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp
index a1339f50c9bf2c09e144a890e6488f00270952ba..60a02be1a916b6c0f988ea1e05ae6acfaad16d72 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.cpp
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/V8ThrowException.h"
+#include "bindings/modules/v8/RequestOrUSVStringOrRequestOrUSVStringSequence.h"
#include "modules/background_fetch/BackgroundFetchOptions.h"
#include "modules/background_fetch/BackgroundFetchRegistration.h"
#include "modules/serviceworkers/ServiceWorkerRegistration.h"
@@ -22,8 +23,18 @@ BackgroundFetchManager::BackgroundFetchManager(
ScriptPromise BackgroundFetchManager::fetch(
ScriptState* scriptState,
String tag,
- HeapVector<RequestOrUSVString> requests,
+ const RequestOrUSVStringOrRequestOrUSVStringSequence& requests,
const BackgroundFetchOptions& options) {
+ if (requests.isRequest()) {
+ LOG(INFO) << "We were passed a Request IDL object.";
+ } else if (requests.isUSVString()) {
+ LOG(INFO) << "We were passed an USVString.";
+ } else if (requests.isRequestOrUSVStringSequence()) {
+ LOG(INFO) << "We were passed a sequence<(Request or USVString)>.";
+ } else /* requests.isNull() */ {
+ NOTREACHED();
+ }
+
if (!m_registration->active()) {
return ScriptPromise::reject(
scriptState,

Powered by Google App Engine
This is Rietveld 408576698