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

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

Issue 2810513002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in modules/filesystem (Closed)
Patch Set: split Created 3 years, 8 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 | « third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp ('k') | no next file » | 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 LocalFileSystem* LocalFileSystem::From(ExecutionContext& context) { 195 LocalFileSystem* LocalFileSystem::From(ExecutionContext& context) {
196 if (context.IsDocument()) { 196 if (context.IsDocument()) {
197 LocalFileSystem* file_system = 197 LocalFileSystem* file_system =
198 static_cast<LocalFileSystem*>(Supplement<LocalFrame>::From( 198 static_cast<LocalFileSystem*>(Supplement<LocalFrame>::From(
199 ToDocument(context).GetFrame(), SupplementName())); 199 ToDocument(context).GetFrame(), SupplementName()));
200 DCHECK(file_system); 200 DCHECK(file_system);
201 return file_system; 201 return file_system;
202 } 202 }
203 203
204 WorkerClients* clients = ToWorkerGlobalScope(context).Clients(); 204 WorkerClients* clients = ToWorkerGlobalScope(context).Clients();
205 ASSERT(clients); 205 DCHECK(clients);
206 LocalFileSystem* file_system = static_cast<LocalFileSystem*>( 206 LocalFileSystem* file_system = static_cast<LocalFileSystem*>(
207 Supplement<WorkerClients>::From(clients, SupplementName())); 207 Supplement<WorkerClients>::From(clients, SupplementName()));
208 DCHECK(file_system); 208 DCHECK(file_system);
209 return file_system; 209 return file_system;
210 } 210 }
211 211
212 void ProvideLocalFileSystemTo(LocalFrame& frame, 212 void ProvideLocalFileSystemTo(LocalFrame& frame,
213 std::unique_ptr<FileSystemClient> client) { 213 std::unique_ptr<FileSystemClient> client) {
214 frame.ProvideSupplement(LocalFileSystem::SupplementName(), 214 frame.ProvideSupplement(LocalFileSystem::SupplementName(),
215 new LocalFileSystem(frame, std::move(client))); 215 new LocalFileSystem(frame, std::move(client)));
216 } 216 }
217 217
218 void ProvideLocalFileSystemToWorker(WorkerClients* worker_clients, 218 void ProvideLocalFileSystemToWorker(WorkerClients* worker_clients,
219 std::unique_ptr<FileSystemClient> client) { 219 std::unique_ptr<FileSystemClient> client) {
220 Supplement<WorkerClients>::ProvideTo( 220 Supplement<WorkerClients>::ProvideTo(
221 *worker_clients, LocalFileSystem::SupplementName(), 221 *worker_clients, LocalFileSystem::SupplementName(),
222 new LocalFileSystem(*worker_clients, std::move(client))); 222 new LocalFileSystem(*worker_clients, std::move(client)));
223 } 223 }
224 224
225 } // namespace blink 225 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/filesystem/FileWriterSync.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698