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

Side by Side Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Issue 2412513004: Revert the comment change in ServiceWorkerGlobalScopeProxy.cpp of https://crrev.com/2376403004 (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // promise rejection or an uncaught runtime script error. 181 // promise rejection or an uncaught runtime script error.
182 waitUntilObserver->didDispatchEvent(false /* errorOccurred */); 182 waitUntilObserver->didDispatchEvent(false /* errorOccurred */);
183 } 183 }
184 184
185 void ServiceWorkerGlobalScopeProxy::dispatchForeignFetchEvent( 185 void ServiceWorkerGlobalScopeProxy::dispatchForeignFetchEvent(
186 int responseID, 186 int responseID,
187 int eventFinishID, 187 int eventFinishID,
188 const WebServiceWorkerRequest& webRequest) { 188 const WebServiceWorkerRequest& webRequest) {
189 if (!OriginTrials::foreignFetchEnabled(workerGlobalScope())) { 189 if (!OriginTrials::foreignFetchEnabled(workerGlobalScope())) {
190 // If origin trial tokens have expired, or are otherwise no longer valid 190 // If origin trial tokens have expired, or are otherwise no longer valid
191 // no events should be dispatched. We can check it in the browser process if 191 // no events should be dispatched.
192 // the service worker is installed after M56. But if the service worker was 192 // TODO(mek): Ideally the browser wouldn't even start the service worker
193 // installed in old version of Chrome (< M56) we have to check it in the 193 // if its tokens have expired.
194 // renderer process (here).
195 ServiceWorkerGlobalScopeClient::from(workerGlobalScope()) 194 ServiceWorkerGlobalScopeClient::from(workerGlobalScope())
196 ->respondToFetchEvent(responseID, WTF::currentTime()); 195 ->respondToFetchEvent(responseID, WTF::currentTime());
197 ServiceWorkerGlobalScopeClient::from(workerGlobalScope()) 196 ServiceWorkerGlobalScopeClient::from(workerGlobalScope())
198 ->didHandleFetchEvent(eventFinishID, 197 ->didHandleFetchEvent(eventFinishID,
199 WebServiceWorkerEventResultCompleted, 198 WebServiceWorkerEventResultCompleted,
200 WTF::currentTime()); 199 WTF::currentTime());
201 return; 200 return;
202 } 201 }
203 202
204 ScriptState::Scope scope( 203 ScriptState::Scope scope(
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 return *m_document; 407 return *m_document;
409 } 408 }
410 409
411 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope() 410 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope()
412 const { 411 const {
413 DCHECK(m_workerGlobalScope); 412 DCHECK(m_workerGlobalScope);
414 return m_workerGlobalScope; 413 return m_workerGlobalScope;
415 } 414 }
416 415
417 } // namespace blink 416 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698