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

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

Issue 2068053002: Rename Blink constants generated from IDL files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 * 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 SuccessCallback* getSuccessCallback() { return SuccessCallbackImpl::create(t his); } 69 SuccessCallback* getSuccessCallback() { return SuccessCallbackImpl::create(t his); }
70 ErrorCallbackBase* getErrorCallback() { return ErrorCallbackImpl::create(thi s); } 70 ErrorCallbackBase* getErrorCallback() { return ErrorCallbackImpl::create(thi s); }
71 71
72 DEFINE_INLINE_TRACE() 72 DEFINE_INLINE_TRACE()
73 { 73 {
74 visitor->trace(m_result); 74 visitor->trace(m_result);
75 } 75 }
76 76
77 private: 77 private:
78 SyncCallbackHelper() 78 SyncCallbackHelper()
79 : m_errorCode(FileError::OK) 79 : m_errorCode(FileError::kOK)
80 , m_completed(false) 80 , m_completed(false)
81 { 81 {
82 } 82 }
83 83
84 class SuccessCallbackImpl final : public SuccessCallback { 84 class SuccessCallbackImpl final : public SuccessCallback {
85 public: 85 public:
86 static SuccessCallbackImpl* create(HelperType* helper) 86 static SuccessCallbackImpl* create(HelperType* helper)
87 { 87 {
88 return new SuccessCallbackImpl(helper); 88 return new SuccessCallbackImpl(helper);
89 } 89 }
90 90
91 virtual void handleEvent() 91 virtual void handleEvent()
92 { 92 {
93 m_helper->setError(FileError::OK); 93 m_helper->setError(FileError::kOK);
94 } 94 }
95 95
96 virtual void handleEvent(CallbackArg arg) 96 virtual void handleEvent(CallbackArg arg)
97 { 97 {
98 m_helper->setResult(arg); 98 m_helper->setResult(arg);
99 } 99 }
100 100
101 DEFINE_INLINE_TRACE() 101 DEFINE_INLINE_TRACE()
102 { 102 {
103 visitor->trace(m_helper); 103 visitor->trace(m_helper);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 }; 165 };
166 166
167 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe lper; 167 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe lper;
168 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa llbackHelper; 168 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa llbackHelper;
169 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback Helper; 169 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback Helper;
170 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync > FileSystemSyncCallbackHelper; 170 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync > FileSystemSyncCallbackHelper;
171 171
172 } // namespace blink 172 } // namespace blink
173 173
174 #endif // SyncCallbackHelper_h 174 #endif // SyncCallbackHelper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698