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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp

Issue 2141493002: Add missing traces for Supplement<> classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 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) 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 KURL storagePartition = KURL(KURL(), context->getSecurityOrigin()->toString( )); 189 KURL storagePartition = KURL(KURL(), context->getSecurityOrigin()->toString( ));
190 fileSystem->deleteFileSystem(storagePartition, static_cast<WebFileSystemType >(type), callbacks->release()); 190 fileSystem->deleteFileSystem(storagePartition, static_cast<WebFileSystemType >(type), callbacks->release());
191 } 191 }
192 192
193 LocalFileSystem::LocalFileSystem(std::unique_ptr<FileSystemClient> client) 193 LocalFileSystem::LocalFileSystem(std::unique_ptr<FileSystemClient> client)
194 : m_client(std::move(client)) 194 : m_client(std::move(client))
195 { 195 {
196 } 196 }
197 197
198 DEFINE_TRACE(LocalFileSystem)
199 {
200 Supplement<LocalFrame>::trace(visitor);
201 Supplement<WorkerClients>::trace(visitor);
202 }
203
198 const char* LocalFileSystem::supplementName() 204 const char* LocalFileSystem::supplementName()
199 { 205 {
200 return "LocalFileSystem"; 206 return "LocalFileSystem";
201 } 207 }
202 208
203 LocalFileSystem* LocalFileSystem::from(ExecutionContext& context) 209 LocalFileSystem* LocalFileSystem::from(ExecutionContext& context)
204 { 210 {
205 if (context.isDocument()) 211 if (context.isDocument())
206 return static_cast<LocalFileSystem*>(Supplement<LocalFrame>::from(toDocu ment(context).frame(), supplementName())); 212 return static_cast<LocalFileSystem*>(Supplement<LocalFrame>::from(toDocu ment(context).frame(), supplementName()));
207 213
208 WorkerClients* clients = toWorkerGlobalScope(context).clients(); 214 WorkerClients* clients = toWorkerGlobalScope(context).clients();
209 ASSERT(clients); 215 ASSERT(clients);
210 return static_cast<LocalFileSystem*>(Supplement<WorkerClients>::from(clients , supplementName())); 216 return static_cast<LocalFileSystem*>(Supplement<WorkerClients>::from(clients , supplementName()));
211 } 217 }
212 218
213 void provideLocalFileSystemTo(LocalFrame& frame, std::unique_ptr<FileSystemClien t> client) 219 void provideLocalFileSystemTo(LocalFrame& frame, std::unique_ptr<FileSystemClien t> client)
214 { 220 {
215 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem:: create(std::move(client))); 221 frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem:: create(std::move(client)));
216 } 222 }
217 223
218 void provideLocalFileSystemToWorker(WorkerClients* clients, std::unique_ptr<File SystemClient> client) 224 void provideLocalFileSystemToWorker(WorkerClients* clients, std::unique_ptr<File SystemClient> client)
219 { 225 {
220 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste m::create(std::move(client))); 226 clients->provideSupplement(LocalFileSystem::supplementName(), LocalFileSyste m::create(std::move(client)));
221 } 227 }
222 228
223 } // namespace blink 229 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698