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

Side by Side Diff: chrome/browser/local_discovery/storage/privet_filesystem_async_util.h

Issue 141703022: Support for file listing in privet local filesystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_ASYNC_UTIL_H_ 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_ASYNC_UTIL_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_ASYNC_UTIL_H_ 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_ASYNC_UTIL_H_
7 7
8 #include <set>
9
10 #include "chrome/browser/local_discovery/storage/privet_filesystem_operations.h"
11 #include "content/public/browser/browser_context.h"
8 #include "webkit/browser/fileapi/async_file_util.h" 12 #include "webkit/browser/fileapi/async_file_util.h"
9 13
10 namespace local_discovery { 14 namespace local_discovery {
11 15
12 class PrivetFileSystemAsyncUtil : public fileapi::AsyncFileUtil { 16 class PrivetFileSystemAsyncUtil
17 : public fileapi::AsyncFileUtil,
18 public PrivetFileSystemAsyncOperationContainer {
13 public: 19 public:
20 explicit PrivetFileSystemAsyncUtil(content::BrowserContext* browser_context);
21 virtual ~PrivetFileSystemAsyncUtil();
22
14 virtual void CreateOrOpen( 23 virtual void CreateOrOpen(
15 scoped_ptr<fileapi::FileSystemOperationContext> context, 24 scoped_ptr<fileapi::FileSystemOperationContext> context,
16 const fileapi::FileSystemURL& url, 25 const fileapi::FileSystemURL& url,
17 int file_flags, 26 int file_flags,
18 const CreateOrOpenCallback& callback) OVERRIDE; 27 const CreateOrOpenCallback& callback) OVERRIDE;
19 virtual void EnsureFileExists( 28 virtual void EnsureFileExists(
20 scoped_ptr<fileapi::FileSystemOperationContext> context, 29 scoped_ptr<fileapi::FileSystemOperationContext> context,
21 const fileapi::FileSystemURL& url, 30 const fileapi::FileSystemURL& url,
22 const EnsureFileExistsCallback& callback) OVERRIDE; 31 const EnsureFileExistsCallback& callback) OVERRIDE;
23 virtual void CreateDirectory( 32 virtual void CreateDirectory(
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const fileapi::FileSystemURL& url, 81 const fileapi::FileSystemURL& url,
73 const StatusCallback& callback) OVERRIDE; 82 const StatusCallback& callback) OVERRIDE;
74 virtual void DeleteRecursively( 83 virtual void DeleteRecursively(
75 scoped_ptr<fileapi::FileSystemOperationContext> context, 84 scoped_ptr<fileapi::FileSystemOperationContext> context,
76 const fileapi::FileSystemURL& url, 85 const fileapi::FileSystemURL& url,
77 const StatusCallback& callback) OVERRIDE; 86 const StatusCallback& callback) OVERRIDE;
78 virtual void CreateSnapshotFile( 87 virtual void CreateSnapshotFile(
79 scoped_ptr<fileapi::FileSystemOperationContext> context, 88 scoped_ptr<fileapi::FileSystemOperationContext> context,
80 const fileapi::FileSystemURL& url, 89 const fileapi::FileSystemURL& url,
81 const CreateSnapshotFileCallback& callback) OVERRIDE; 90 const CreateSnapshotFileCallback& callback) OVERRIDE;
91
92
93 virtual void RemoveOperation(
94 PrivetFileSystemAsyncOperation* operation) OVERRIDE;
95 virtual void RemoveAllOperations() OVERRIDE;
96
97 private:
98
99 std::set<PrivetFileSystemAsyncOperation*> async_operations_;
100 content::BrowserContext* browser_context_;
82 }; 101 };
83 102
84 } // namespace local_discovery 103 } // namespace local_discovery
85 104
86 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_ASYNC_UTIL_H _ 105 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_STORAGE_PRIVET_FILESYSTEM_ASYNC_UTIL_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698