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

Side by Side Diff: Source/core/fetch/ResourceLoader.cpp

Issue 655373003: [ServiceWorker] Fix ResourceFetcher::isControlledByServiceWorker to support HTMLImports. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: change assert Created 6 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 unified diff | Download patch
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | 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) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 bool isValidStateTransition = (m_connectionState == ConnectionStateStarted | | m_connectionState == ConnectionStateReceivedResponse); 355 bool isValidStateTransition = (m_connectionState == ConnectionStateStarted | | m_connectionState == ConnectionStateReceivedResponse);
356 // In the case of multipart loads, calls to didReceiveData & didReceiveRespo nse can be interleaved. 356 // In the case of multipart loads, calls to didReceiveData & didReceiveRespo nse can be interleaved.
357 RELEASE_ASSERT(isMultipartPayload || isValidStateTransition); 357 RELEASE_ASSERT(isMultipartPayload || isValidStateTransition);
358 m_connectionState = ConnectionStateReceivedResponse; 358 m_connectionState = ConnectionStateReceivedResponse;
359 359
360 const ResourceResponse& resourceResponse = response.toResourceResponse(); 360 const ResourceResponse& resourceResponse = response.toResourceResponse();
361 361
362 if (responseNeedsAccessControlCheck()) { 362 if (responseNeedsAccessControlCheck()) {
363 if (response.wasFetchedViaServiceWorker()) { 363 if (response.wasFetchedViaServiceWorker()) {
364 if (response.wasFallbackRequiredByServiceWorker()) { 364 if (response.wasFallbackRequiredByServiceWorker()) {
365 ASSERT(m_fallbackRequestForServiceWorker);
365 m_loader->cancel(); 366 m_loader->cancel();
366 m_loader.clear(); 367 m_loader.clear();
367 m_connectionState = ConnectionStateStarted; 368 m_connectionState = ConnectionStateStarted;
368 m_request = *m_fallbackRequestForServiceWorker; 369 m_request = *m_fallbackRequestForServiceWorker;
369 m_loader = adoptPtr(blink::Platform::current()->createURLLoader( )); 370 m_loader = adoptPtr(blink::Platform::current()->createURLLoader( ));
370 ASSERT(m_loader); 371 ASSERT(m_loader);
371 blink::WrappedResourceRequest wrappedRequest(m_request); 372 blink::WrappedResourceRequest wrappedRequest(m_request);
372 m_loader->loadAsynchronously(wrappedRequest, this); 373 m_loader->loadAsynchronously(wrappedRequest, this);
373 return; 374 return;
374 } 375 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 m_requestCountTracker.clear(); 556 m_requestCountTracker.clear();
556 } 557 }
557 558
558 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const 559 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const
559 { 560 {
560 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials); 561 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials);
561 return request; 562 return request;
562 } 563 }
563 564
564 } 565 }
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698