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

Side by Side Diff: third_party/WebKit/Source/platform/network/ResourceResponse.h

Issue 2684933011: M57: Add UseCounter for ServiceWorkerNavigationPreload. (Closed)
Patch Set: Created 3 years, 10 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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 m_cacheStorageCacheName = cacheStorageCacheName; 331 m_cacheStorageCacheName = cacheStorageCacheName;
332 } 332 }
333 333
334 const Vector<String>& corsExposedHeaderNames() const { 334 const Vector<String>& corsExposedHeaderNames() const {
335 return m_corsExposedHeaderNames; 335 return m_corsExposedHeaderNames;
336 } 336 }
337 void setCorsExposedHeaderNames(const Vector<String>& headerNames) { 337 void setCorsExposedHeaderNames(const Vector<String>& headerNames) {
338 m_corsExposedHeaderNames = headerNames; 338 m_corsExposedHeaderNames = headerNames;
339 } 339 }
340 340
341 bool didServiceWorkerNavigationPreload() const {
342 return m_didServiceWorkerNavigationPreload;
343 }
344 void setDidServiceWorkerNavigationPreload(bool value) {
345 m_didServiceWorkerNavigationPreload = value;
346 }
347
341 int64_t responseTime() const { return m_responseTime; } 348 int64_t responseTime() const { return m_responseTime; }
342 void setResponseTime(int64_t responseTime) { m_responseTime = responseTime; } 349 void setResponseTime(int64_t responseTime) { m_responseTime = responseTime; }
343 350
344 const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; } 351 const AtomicString& remoteIPAddress() const { return m_remoteIPAddress; }
345 void setRemoteIPAddress(const AtomicString& value) { 352 void setRemoteIPAddress(const AtomicString& value) {
346 m_remoteIPAddress = value; 353 m_remoteIPAddress = value;
347 } 354 }
348 355
349 unsigned short remotePort() const { return m_remotePort; } 356 unsigned short remotePort() const { return m_remotePort; }
350 void setRemotePort(unsigned short value) { m_remotePort = value; } 357 void setRemotePort(unsigned short value) { m_remotePort = value; }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 Vector<KURL> m_urlListViaServiceWorker; 482 Vector<KURL> m_urlListViaServiceWorker;
476 483
477 // The cache name of the CacheStorage from where the response is served via 484 // The cache name of the CacheStorage from where the response is served via
478 // the ServiceWorker. Null if the response isn't from the CacheStorage. 485 // the ServiceWorker. Null if the response isn't from the CacheStorage.
479 String m_cacheStorageCacheName; 486 String m_cacheStorageCacheName;
480 487
481 // The headers that should be exposed according to CORS. Only guaranteed 488 // The headers that should be exposed according to CORS. Only guaranteed
482 // to be set if the response was fetched by a ServiceWorker. 489 // to be set if the response was fetched by a ServiceWorker.
483 Vector<String> m_corsExposedHeaderNames; 490 Vector<String> m_corsExposedHeaderNames;
484 491
492 // True if service worker navigation preload was performed due to
493 // the request for this resource.
494 bool m_didServiceWorkerNavigationPreload;
495
485 // The time at which the response headers were received. For cached 496 // The time at which the response headers were received. For cached
486 // responses, this time could be "far" in the past. 497 // responses, this time could be "far" in the past.
487 int64_t m_responseTime; 498 int64_t m_responseTime;
488 499
489 // Remote IP address of the socket which fetched this resource. 500 // Remote IP address of the socket which fetched this resource.
490 AtomicString m_remoteIPAddress; 501 AtomicString m_remoteIPAddress;
491 502
492 // Remote port number of the socket which fetched this resource. 503 // Remote port number of the socket which fetched this resource.
493 unsigned short m_remotePort; 504 unsigned short m_remotePort;
494 505
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 bool m_wasFetchedViaSPDY; 564 bool m_wasFetchedViaSPDY;
554 bool m_wasNpnNegotiated; 565 bool m_wasNpnNegotiated;
555 bool m_wasAlternateProtocolAvailable; 566 bool m_wasAlternateProtocolAvailable;
556 bool m_wasFetchedViaProxy; 567 bool m_wasFetchedViaProxy;
557 bool m_wasFetchedViaServiceWorker; 568 bool m_wasFetchedViaServiceWorker;
558 bool m_wasFetchedViaForeignFetch; 569 bool m_wasFetchedViaForeignFetch;
559 bool m_wasFallbackRequiredByServiceWorker; 570 bool m_wasFallbackRequiredByServiceWorker;
560 WebServiceWorkerResponseType m_serviceWorkerResponseType; 571 WebServiceWorkerResponseType m_serviceWorkerResponseType;
561 Vector<KURL> m_urlListViaServiceWorker; 572 Vector<KURL> m_urlListViaServiceWorker;
562 String m_cacheStorageCacheName; 573 String m_cacheStorageCacheName;
574 bool m_didServiceWorkerNavigationPreload;
563 int64_t m_responseTime; 575 int64_t m_responseTime;
564 String m_remoteIPAddress; 576 String m_remoteIPAddress;
565 unsigned short m_remotePort; 577 unsigned short m_remotePort;
566 long long m_encodedDataLength; 578 long long m_encodedDataLength;
567 long long m_encodedBodyLength; 579 long long m_encodedBodyLength;
568 long long m_decodedBodyLength; 580 long long m_decodedBodyLength;
569 String m_downloadedFilePath; 581 String m_downloadedFilePath;
570 RefPtr<BlobDataHandle> m_downloadedFileHandle; 582 RefPtr<BlobDataHandle> m_downloadedFileHandle;
571 }; 583 };
572 584
573 } // namespace blink 585 } // namespace blink
574 586
575 #endif // ResourceResponse_h 587 #endif // ResourceResponse_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698