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

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

Issue 2097253002: Remove ExecutionContextTask subclasses from DOMFileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ECT_TaskName
Patch Set: 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 bool DOMFileSystem::hasPendingActivity() const 112 bool DOMFileSystem::hasPendingActivity() const
113 { 113 {
114 ASSERT(m_numberOfPendingCallbacks >= 0); 114 ASSERT(m_numberOfPendingCallbacks >= 0);
115 return m_numberOfPendingCallbacks; 115 return m_numberOfPendingCallbacks;
116 } 116 }
117 117
118 void DOMFileSystem::reportError(ErrorCallback* errorCallback, FileError* fileErr or) 118 void DOMFileSystem::reportError(ErrorCallback* errorCallback, FileError* fileErr or)
119 { 119 {
120 scheduleCallback(errorCallback, fileError); 120 reportError(getExecutionContext(), errorCallback, fileError);
121 }
122
123 void DOMFileSystem::reportError(ExecutionContext* executionContext, ErrorCallbac k* errorCallback, FileError* fileError)
124 {
125 if (errorCallback)
126 scheduleCallback(executionContext, createSameThreadTask(&ErrorCallback:: handleEvent, wrapPersistent(errorCallback), wrapPersistent(fileError)));
121 } 127 }
122 128
123 namespace { 129 namespace {
124 130
125 class ConvertToFileWriterCallback : public FileWriterBaseCallback { 131 class ConvertToFileWriterCallback : public FileWriterBaseCallback {
126 public: 132 public:
127 static ConvertToFileWriterCallback* create(FileWriterCallback* callback) 133 static ConvertToFileWriterCallback* create(FileWriterCallback* callback)
128 { 134 {
129 return new ConvertToFileWriterCallback(callback); 135 return new ConvertToFileWriterCallback(callback);
130 } 136 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 182 }
177 183
178 DEFINE_TRACE(DOMFileSystem) 184 DEFINE_TRACE(DOMFileSystem)
179 { 185 {
180 DOMFileSystemBase::trace(visitor); 186 DOMFileSystemBase::trace(visitor);
181 ActiveDOMObject::trace(visitor); 187 ActiveDOMObject::trace(visitor);
182 visitor->trace(m_rootEntry); 188 visitor->trace(m_rootEntry);
183 } 189 }
184 190
185 } // namespace blink 191 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698