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

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

Issue 378473002: [ServiceWorker] Add wasFetchedViaServiceWorker flag to WebURLResponse and ResourceResponse. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 context().dispatchDidFail(m_documentLoader, resource->identifier(), error); 1283 context().dispatchDidFail(m_documentLoader, resource->identifier(), error);
1284 } 1284 }
1285 1285
1286 void ResourceFetcher::willSendRequest(unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& in itiatorInfo) 1286 void ResourceFetcher::willSendRequest(unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiatorInfo& in itiatorInfo)
1287 { 1287 {
1288 context().dispatchWillSendRequest(m_documentLoader, identifier, request, red irectResponse, initiatorInfo); 1288 context().dispatchWillSendRequest(m_documentLoader, identifier, request, red irectResponse, initiatorInfo);
1289 } 1289 }
1290 1290
1291 void ResourceFetcher::didReceiveResponse(const Resource* resource, const Resourc eResponse& response) 1291 void ResourceFetcher::didReceiveResponse(const Resource* resource, const Resourc eResponse& response)
1292 { 1292 {
1293 // FIXME: When response.wasFetchedViaServiceWorker() is true, we need to che ck the URL of the responce for CSP and CORS.
1293 context().dispatchDidReceiveResponse(m_documentLoader, resource->identifier( ), response, resource->loader()); 1294 context().dispatchDidReceiveResponse(m_documentLoader, resource->identifier( ), response, resource->loader());
1294 } 1295 }
1295 1296
1296 void ResourceFetcher::didReceiveData(const Resource* resource, const char* data, int dataLength, int encodedDataLength) 1297 void ResourceFetcher::didReceiveData(const Resource* resource, const char* data, int dataLength, int encodedDataLength)
1297 { 1298 {
1298 context().dispatchDidReceiveData(m_documentLoader, resource->identifier(), d ata, dataLength, encodedDataLength); 1299 context().dispatchDidReceiveData(m_documentLoader, resource->identifier(), d ata, dataLength, encodedDataLength);
1299 } 1300 }
1300 1301
1301 void ResourceFetcher::didDownloadData(const Resource* resource, int dataLength, int encodedDataLength) 1302 void ResourceFetcher::didDownloadData(const Resource* resource, int dataLength, int encodedDataLength)
1302 { 1303 {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 } 1500 }
1500 } 1501 }
1501 1502
1502 void ResourceFetcher::trace(Visitor* visitor) 1503 void ResourceFetcher::trace(Visitor* visitor)
1503 { 1504 {
1504 visitor->trace(m_document); 1505 visitor->trace(m_document);
1505 ResourceLoaderHost::trace(visitor); 1506 ResourceLoaderHost::trace(visitor);
1506 } 1507 }
1507 1508
1508 } 1509 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | Source/platform/network/ResourceResponse.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698