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

Side by Side Diff: Source/core/loader/FrameFetchContext.cpp

Issue 1216093003: Service Worker: Migrate to version_uuid and surface ServiceWorker.id. (Blink 1/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/loader/FrameFetchContext.h ('k') | Source/core/loader/FrameLoaderClient.h » ('j') | 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 { 507 {
508 ASSERT(m_documentLoader || frame()->loader().documentLoader()); 508 ASSERT(m_documentLoader || frame()->loader().documentLoader());
509 if (m_documentLoader) 509 if (m_documentLoader)
510 return frame()->loader().client()->isControlledByServiceWorker(*m_docume ntLoader); 510 return frame()->loader().client()->isControlledByServiceWorker(*m_docume ntLoader);
511 // m_documentLoader is null while loading resources from an HTML import. 511 // m_documentLoader is null while loading resources from an HTML import.
512 // In such cases whether the request is controlled by ServiceWorker or not 512 // In such cases whether the request is controlled by ServiceWorker or not
513 // is determined by the document loader of the frame. 513 // is determined by the document loader of the frame.
514 return frame()->loader().client()->isControlledByServiceWorker(*frame()->loa der().documentLoader()); 514 return frame()->loader().client()->isControlledByServiceWorker(*frame()->loa der().documentLoader());
515 } 515 }
516 516
517 int64_t FrameFetchContext::serviceWorkerID() const 517 std::string FrameFetchContext::serviceWorkerID() const
518 { 518 {
519 ASSERT(m_documentLoader || frame()->loader().documentLoader()); 519 ASSERT(m_documentLoader || frame()->loader().documentLoader());
520 if (m_documentLoader) 520 if (m_documentLoader)
521 return frame()->loader().client()->serviceWorkerID(*m_documentLoader); 521 return frame()->loader().client()->serviceWorkerID(*m_documentLoader);
522 // m_documentLoader is null while loading resources from an HTML import. 522 // m_documentLoader is null while loading resources from an HTML import.
523 // In such cases a service worker ID could be retrieved from the document 523 // In such cases a service worker ID could be retrieved from the document
524 // loader of the frame. 524 // loader of the frame.
525 return frame()->loader().client()->serviceWorkerID(*frame()->loader().docume ntLoader()); 525 return frame()->loader().client()->serviceWorkerID(*frame()->loader().docume ntLoader());
526 } 526 }
527 527
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 return !frame()->isMainFrame() && frame()->settings() && frame()->settings() ->lowPriorityIframes(); 661 return !frame()->isMainFrame() && frame()->settings() && frame()->settings() ->lowPriorityIframes();
662 } 662 }
663 663
664 DEFINE_TRACE(FrameFetchContext) 664 DEFINE_TRACE(FrameFetchContext)
665 { 665 {
666 visitor->trace(m_document); 666 visitor->trace(m_document);
667 FetchContext::trace(visitor); 667 FetchContext::trace(visitor);
668 } 668 }
669 669
670 } // namespace blink 670 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/FrameFetchContext.h ('k') | Source/core/loader/FrameLoaderClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698