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

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

Issue 2040563002: Remove FileError interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fe-dep
Patch Set: Review feedback Created 4 years, 6 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 DOMFileSystemSync::DOMFileSystemSync(ExecutionContext* context, const String& na me, FileSystemType type, const KURL& rootURL) 56 DOMFileSystemSync::DOMFileSystemSync(ExecutionContext* context, const String& na me, FileSystemType type, const KURL& rootURL)
57 : DOMFileSystemBase(context, name, type, rootURL) 57 : DOMFileSystemBase(context, name, type, rootURL)
58 , m_rootEntry(DirectoryEntrySync::create(this, DOMFilePath::root)) 58 , m_rootEntry(DirectoryEntrySync::create(this, DOMFilePath::root))
59 { 59 {
60 } 60 }
61 61
62 DOMFileSystemSync::~DOMFileSystemSync() 62 DOMFileSystemSync::~DOMFileSystemSync()
63 { 63 {
64 } 64 }
65 65
66 void DOMFileSystemSync::reportError(ErrorCallback* errorCallback, FileError* fil eError) 66 void DOMFileSystemSync::reportError(ErrorCallback* errorCallback, FileError::Err orCode fileError)
67 { 67 {
68 errorCallback->handleEvent(fileError); 68 errorCallback->handleEvent(fileError);
69 } 69 }
70 70
71 DirectoryEntrySync* DOMFileSystemSync::root() 71 DirectoryEntrySync* DOMFileSystemSync::root()
72 { 72 {
73 return m_rootEntry.get(); 73 return m_rootEntry.get();
74 } 74 }
75 75
76 namespace { 76 namespace {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 }; 180 };
181 181
182 class LocalErrorCallback final : public ErrorCallback { 182 class LocalErrorCallback final : public ErrorCallback {
183 public: 183 public:
184 static LocalErrorCallback* create(FileError::ErrorCode& errorCode) 184 static LocalErrorCallback* create(FileError::ErrorCode& errorCode)
185 { 185 {
186 return new LocalErrorCallback(errorCode); 186 return new LocalErrorCallback(errorCode);
187 } 187 }
188 188
189 void handleEvent(FileError* error) override 189 void handleEvent(DOMException* error) override
190 { 190 {
191 ASSERT(error->code() != FileError::OK); 191 NOTREACHED();
192 m_errorCode = error->code(); 192 }
193
194 void handleEvent(FileError::ErrorCode error) override
195 {
196 DCHECK_NE(error, FileError::OK);
197 m_errorCode = error;
193 } 198 }
194 199
195 private: 200 private:
196 explicit LocalErrorCallback(FileError::ErrorCode& errorCode) 201 explicit LocalErrorCallback(FileError::ErrorCode& errorCode)
197 : m_errorCode(errorCode) 202 : m_errorCode(errorCode)
198 { 203 {
199 } 204 }
200 205
201 FileError::ErrorCode& m_errorCode; 206 FileError::ErrorCode& m_errorCode;
202 }; 207 };
(...skipping 20 matching lines...) Expand all
223 return fileWriter; 228 return fileWriter;
224 } 229 }
225 230
226 DEFINE_TRACE(DOMFileSystemSync) 231 DEFINE_TRACE(DOMFileSystemSync)
227 { 232 {
228 DOMFileSystemBase::trace(visitor); 233 DOMFileSystemBase::trace(visitor);
229 visitor->trace(m_rootEntry); 234 visitor->trace(m_rootEntry);
230 } 235 }
231 236
232 } // namespace blink 237 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698