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

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

Issue 23537011: FileAPI: Add WebFileSystem::resolveURL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // whether the FileSystem API object is permitted to be cloned. It defaults 83 // whether the FileSystem API object is permitted to be cloned. It defaults
84 // to false, and must be explicitly set by internal code permit cloning. 84 // to false, and must be explicitly set by internal code permit cloning.
85 void makeClonable() { m_clonable = true; } 85 void makeClonable() { m_clonable = true; }
86 bool clonable() const { return m_clonable; } 86 bool clonable() const { return m_clonable; }
87 87
88 static bool isValidType(FileSystemType); 88 static bool isValidType(FileSystemType);
89 static bool crackFileSystemURL(const KURL&, FileSystemType&, String& filePat h); 89 static bool crackFileSystemURL(const KURL&, FileSystemType&, String& filePat h);
90 bool supportsToURL() const; 90 bool supportsToURL() const;
91 KURL createFileSystemURL(const EntryBase*) const; 91 KURL createFileSystemURL(const EntryBase*) const;
92 KURL createFileSystemURL(const String& fullPath) const; 92 KURL createFileSystemURL(const String& fullPath) const;
93 static bool pathToAbsolutePath(FileSystemType, const EntryBase*, String path , String& absolutePath);
93 94
94 // Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level. 95 // Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level.
95 // They return false for immediate errors that don't involve lower AsyncFile System layer (e.g. for name validation errors). Otherwise they return true (but later may call back with an runtime error). 96 // They return false for immediate errors that don't involve lower AsyncFile System layer (e.g. for name validation errors). Otherwise they return true (but later may call back with an runtime error).
96 bool getMetadata(const EntryBase*, PassRefPtr<MetadataCallback>, PassRefPtr< ErrorCallback>, SynchronousType = Asynchronous); 97 bool getMetadata(const EntryBase*, PassRefPtr<MetadataCallback>, PassRefPtr< ErrorCallback>, SynchronousType = Asynchronous);
97 bool move(const EntryBase* source, EntryBase* parent, const String& name, Pa ssRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchrono us); 98 bool move(const EntryBase* source, EntryBase* parent, const String& name, Pa ssRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchrono us);
98 bool copy(const EntryBase* source, EntryBase* parent, const String& name, Pa ssRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchrono us); 99 bool copy(const EntryBase* source, EntryBase* parent, const String& name, Pa ssRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchrono us);
99 bool remove(const EntryBase*, PassRefPtr<VoidCallback>, PassRefPtr<ErrorCall back>, SynchronousType = Asynchronous); 100 bool remove(const EntryBase*, PassRefPtr<VoidCallback>, PassRefPtr<ErrorCall back>, SynchronousType = Asynchronous);
100 bool removeRecursively(const EntryBase*, PassRefPtr<VoidCallback>, PassRefPt r<ErrorCallback>, SynchronousType = Asynchronous); 101 bool removeRecursively(const EntryBase*, PassRefPtr<VoidCallback>, PassRefPt r<ErrorCallback>, SynchronousType = Asynchronous);
101 bool getParent(const EntryBase*, PassRefPtr<EntryCallback>, PassRefPtr<Error Callback>); 102 bool getParent(const EntryBase*, PassRefPtr<EntryCallback>, PassRefPtr<Error Callback>);
102 bool getFile(const EntryBase*, const String& path, const FileSystemFlags&, P assRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchron ous); 103 bool getFile(const EntryBase*, const String& path, const FileSystemFlags&, P assRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, SynchronousType = Asynchron ous);
(...skipping 11 matching lines...) Expand all
114 bool m_clonable; 115 bool m_clonable;
115 116
116 mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem; 117 mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem;
117 }; 118 };
118 119
119 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) { return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL (); } 120 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) { return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL (); }
120 121
121 } // namespace WebCore 122 } // namespace WebCore
122 123
123 #endif // DOMFileSystemBase_h 124 #endif // DOMFileSystemBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698