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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.cpp

Issue 2249373002: Make Resource MemoryCoordinatorClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment Created 4 years, 3 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 // 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698