Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h" | 5 #include "modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h" |
| 6 | 6 |
| 7 #include "core/fetch/CachedMetadata.h" | 7 #include "core/fetch/CachedMetadata.h" |
| 8 #include "core/workers/WorkerGlobalScope.h" | 8 #include "core/workers/WorkerGlobalScope.h" |
| 9 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" | 9 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 } | 38 } |
| 39 | 39 |
| 40 void ServiceWorkerScriptCachedMetadataHandler::clearCachedMetadata(CacheType typ e) | 40 void ServiceWorkerScriptCachedMetadataHandler::clearCachedMetadata(CacheType typ e) |
| 41 { | 41 { |
| 42 if (type != SendToPlatform) | 42 if (type != SendToPlatform) |
| 43 return; | 43 return; |
| 44 m_cachedMetadata = nullptr; | 44 m_cachedMetadata = nullptr; |
| 45 ServiceWorkerGlobalScopeClient::from(m_workerGlobalScope)->clearCachedMetada ta(m_scriptURL); | 45 ServiceWorkerGlobalScopeClient::from(m_workerGlobalScope)->clearCachedMetada ta(m_scriptURL); |
| 46 } | 46 } |
| 47 | 47 |
| 48 CachedMetadata* ServiceWorkerScriptCachedMetadataHandler::cachedMetadata(unsigne d dataTypeID) const | 48 PassRefPtr<CachedMetadata> ServiceWorkerScriptCachedMetadataHandler::cachedMetad ata(unsigned dataTypeID) const |
| 49 { | 49 { |
| 50 if (!m_cachedMetadata || m_cachedMetadata->dataTypeID() != dataTypeID) | 50 if (!m_cachedMetadata || m_cachedMetadata->dataTypeID() != dataTypeID) |
| 51 return nullptr; | 51 return nullptr; |
| 52 return m_cachedMetadata.get(); | 52 return m_cachedMetadata.get(); |
|
hiroshige
2016/08/25 12:48:11
We can remove .get() here.
| |
| 53 } | 53 } |
| 54 | 54 |
| 55 String ServiceWorkerScriptCachedMetadataHandler::encoding() const | 55 String ServiceWorkerScriptCachedMetadataHandler::encoding() const |
| 56 { | 56 { |
| 57 return emptyString(); | 57 return emptyString(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace blink | 60 } // namespace blink |
| OLD | NEW |