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

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

Issue 516763002: Fix userVisibility for files in ChromeOS filesystems. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fileapi/File.cpp ('k') | Source/modules/filesystem/DOMFileSystemBase.cpp » ('j') | 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 * 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class DirectoryEntry; 46 class DirectoryEntry;
47 class DirectoryReaderBase; 47 class DirectoryReaderBase;
48 class EntriesCallback; 48 class EntriesCallback;
49 class EntryBase; 49 class EntryBase;
50 class EntryCallback; 50 class EntryCallback;
51 class ErrorCallback; 51 class ErrorCallback;
52 class File;
52 class FileError; 53 class FileError;
54 struct FileMetadata;
53 class MetadataCallback; 55 class MetadataCallback;
54 class ExecutionContext; 56 class ExecutionContext;
55 class SecurityOrigin; 57 class SecurityOrigin;
56 class VoidCallback; 58 class VoidCallback;
57 59
58 // A common base class for DOMFileSystem and DOMFileSystemSync. 60 // A common base class for DOMFileSystem and DOMFileSystemSync.
59 class DOMFileSystemBase : public GarbageCollectedFinalized<DOMFileSystemBase> { 61 class DOMFileSystemBase : public GarbageCollectedFinalized<DOMFileSystemBase> {
60 public: 62 public:
61 enum SynchronousType { 63 enum SynchronousType {
62 Synchronous, 64 Synchronous,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 bool clonable() const { return m_clonable; } 96 bool clonable() const { return m_clonable; }
95 97
96 static bool isValidType(FileSystemType); 98 static bool isValidType(FileSystemType);
97 static bool crackFileSystemURL(const KURL&, FileSystemType&, String& filePat h); 99 static bool crackFileSystemURL(const KURL&, FileSystemType&, String& filePat h);
98 static KURL createFileSystemRootURL(const String& origin, FileSystemType); 100 static KURL createFileSystemRootURL(const String& origin, FileSystemType);
99 bool supportsToURL() const; 101 bool supportsToURL() const;
100 KURL createFileSystemURL(const EntryBase*) const; 102 KURL createFileSystemURL(const EntryBase*) const;
101 KURL createFileSystemURL(const String& fullPath) const; 103 KURL createFileSystemURL(const String& fullPath) const;
102 static bool pathToAbsolutePath(FileSystemType, const EntryBase*, String path , String& absolutePath); 104 static bool pathToAbsolutePath(FileSystemType, const EntryBase*, String path , String& absolutePath);
103 static bool pathPrefixToFileSystemType(const String& pathPrefix, FileSystemT ype&); 105 static bool pathPrefixToFileSystemType(const String& pathPrefix, FileSystemT ype&);
106 static PassRefPtrWillBeRawPtr<File> createFile(const FileMetadata&, const KU RL& fileSystemURL, FileSystemType, const String name);
104 107
105 // Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level. 108 // Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level.
106 void getMetadata(const EntryBase*, PassOwnPtrWillBeRawPtr<MetadataCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous); 109 void getMetadata(const EntryBase*, PassOwnPtrWillBeRawPtr<MetadataCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
107 void move(const EntryBase* source, EntryBase* parent, const String& name, Pa ssOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, Sync hronousType = Asynchronous); 110 void move(const EntryBase* source, EntryBase* parent, const String& name, Pa ssOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, Sync hronousType = Asynchronous);
108 void copy(const EntryBase* source, EntryBase* parent, const String& name, Pa ssOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, Sync hronousType = Asynchronous); 111 void copy(const EntryBase* source, EntryBase* parent, const String& name, Pa ssOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, Sync hronousType = Asynchronous);
109 void remove(const EntryBase*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnP trWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous); 112 void remove(const EntryBase*, PassOwnPtrWillBeRawPtr<VoidCallback>, PassOwnP trWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
110 void removeRecursively(const EntryBase*, PassOwnPtrWillBeRawPtr<VoidCallback >, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous); 113 void removeRecursively(const EntryBase*, PassOwnPtrWillBeRawPtr<VoidCallback >, PassOwnPtrWillBeRawPtr<ErrorCallback>, SynchronousType = Asynchronous);
111 void getParent(const EntryBase*, PassOwnPtrWillBeRawPtr<EntryCallback>, Pass OwnPtrWillBeRawPtr<ErrorCallback>); 114 void getParent(const EntryBase*, PassOwnPtrWillBeRawPtr<EntryCallback>, Pass OwnPtrWillBeRawPtr<ErrorCallback>);
112 void getFile(const EntryBase*, const String& path, const FileSystemFlags&, P assOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, Syn chronousType = Asynchronous); 115 void getFile(const EntryBase*, const String& path, const FileSystemFlags&, P assOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback>, Syn chronousType = Asynchronous);
113 void getDirectory(const EntryBase*, const String& path, const FileSystemFlag s&, PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback> , SynchronousType = Asynchronous); 116 void getDirectory(const EntryBase*, const String& path, const FileSystemFlag s&, PassOwnPtrWillBeRawPtr<EntryCallback>, PassOwnPtrWillBeRawPtr<ErrorCallback> , SynchronousType = Asynchronous);
(...skipping 11 matching lines...) Expand all
125 FileSystemType m_type; 128 FileSystemType m_type;
126 KURL m_filesystemRootURL; 129 KURL m_filesystemRootURL;
127 bool m_clonable; 130 bool m_clonable;
128 }; 131 };
129 132
130 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) { return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL (); } 133 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) { return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL (); }
131 134
132 } // namespace blink 135 } // namespace blink
133 136
134 #endif // DOMFileSystemBase_h 137 #endif // DOMFileSystemBase_h
OLDNEW
« no previous file with comments | « Source/core/fileapi/File.cpp ('k') | Source/modules/filesystem/DOMFileSystemBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698