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

Side by Side Diff: Source/modules/filesystem/SyncCallbackHelper.h

Issue 941363003: InlinedVisitor: Migrate filesystem to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/filesystem/MetadataCallback.h ('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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 { 79 {
80 if (m_errorCode) 80 if (m_errorCode)
81 FileError::throwDOMException(exceptionState, m_errorCode); 81 FileError::throwDOMException(exceptionState, m_errorCode);
82 82
83 return m_result; 83 return m_result;
84 } 84 }
85 85
86 SuccessCallback* successCallback() { return SuccessCallbackImpl::create(this ); } 86 SuccessCallback* successCallback() { return SuccessCallbackImpl::create(this ); }
87 ErrorCallback* errorCallback() { return ErrorCallbackImpl::create(this); } 87 ErrorCallback* errorCallback() { return ErrorCallbackImpl::create(this); }
88 88
89 void trace(Visitor* visitor) 89 DEFINE_INLINE_TRACE()
90 { 90 {
91 visitor->trace(m_result); 91 visitor->trace(m_result);
92 } 92 }
93 93
94 private: 94 private:
95 SyncCallbackHelper() 95 SyncCallbackHelper()
96 : m_errorCode(FileError::OK) 96 : m_errorCode(FileError::OK)
97 , m_completed(false) 97 , m_completed(false)
98 { 98 {
99 } 99 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 FileError::ErrorCode m_errorCode; 160 FileError::ErrorCode m_errorCode;
161 bool m_completed; 161 bool m_completed;
162 }; 162 };
163 163
164 struct EmptyType : public GarbageCollected<EmptyType> { 164 struct EmptyType : public GarbageCollected<EmptyType> {
165 static EmptyType* create(EmptyType*) 165 static EmptyType* create(EmptyType*)
166 { 166 {
167 return 0; 167 return 0;
168 } 168 }
169 169
170 void trace(Visitor*) { } 170 DEFINE_INLINE_TRACE() { }
171 }; 171 };
172 172
173 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe lper; 173 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe lper;
174 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa llbackHelper; 174 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa llbackHelper;
175 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback Helper; 175 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback Helper;
176 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync > FileSystemSyncCallbackHelper; 176 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync > FileSystemSyncCallbackHelper;
177 177
178 } // namespace blink 178 } // namespace blink
179 179
180 #endif // SyncCallbackHelper_h 180 #endif // SyncCallbackHelper_h
OLDNEW
« no previous file with comments | « Source/modules/filesystem/MetadataCallback.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698