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

Side by Side Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp

Issue 2774343002: Hook up BackgroundFetchServiceImpl::Fetch() to start a fetch (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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/background_fetch/BackgroundFetchRegistration.h" 5 #include "modules/background_fetch/BackgroundFetchRegistration.h"
6 6
7 #include "bindings/core/v8/ScriptState.h" 7 #include "bindings/core/v8/ScriptState.h"
8 #include "modules/background_fetch/BackgroundFetchBridge.h" 8 #include "modules/background_fetch/BackgroundFetchBridge.h"
9 #include "modules/background_fetch/IconDefinition.h" 9 #include "modules/background_fetch/IconDefinition.h"
10 #include "modules/serviceworkers/ServiceWorkerRegistration.h" 10 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ScriptPromiseResolver* resolver, 60 ScriptPromiseResolver* resolver,
61 mojom::blink::BackgroundFetchError error) { 61 mojom::blink::BackgroundFetchError error) {
62 switch (error) { 62 switch (error) {
63 case mojom::blink::BackgroundFetchError::NONE: 63 case mojom::blink::BackgroundFetchError::NONE:
64 resolver->resolve(true /* success */); 64 resolver->resolve(true /* success */);
65 return; 65 return;
66 case mojom::blink::BackgroundFetchError::INVALID_TAG: 66 case mojom::blink::BackgroundFetchError::INVALID_TAG:
67 resolver->resolve(false /* success */); 67 resolver->resolve(false /* success */);
68 return; 68 return;
69 case mojom::blink::BackgroundFetchError::DUPLICATED_TAG: 69 case mojom::blink::BackgroundFetchError::DUPLICATED_TAG:
70 case mojom::blink::BackgroundFetchError::INVALID_ARGUMENT:
70 // Not applicable for this callback. 71 // Not applicable for this callback.
71 break; 72 break;
72 } 73 }
73 74
74 NOTREACHED(); 75 NOTREACHED();
75 } 76 }
76 77
77 DEFINE_TRACE(BackgroundFetchRegistration) { 78 DEFINE_TRACE(BackgroundFetchRegistration) {
78 visitor->trace(m_registration); 79 visitor->trace(m_registration);
79 visitor->trace(m_icons); 80 visitor->trace(m_icons);
80 } 81 }
81 82
82 } // namespace blink 83 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698