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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/observe_directory.h

Issue 625463002: [fsp] Add support for observing entries and notifying about changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_system_provider/operations/observe_directory.h
diff --git a/chrome/browser/chromeos/file_system_provider/operations/abort.h b/chrome/browser/chromeos/file_system_provider/operations/observe_directory.h
similarity index 70%
copy from chrome/browser/chromeos/file_system_provider/operations/abort.h
copy to chrome/browser/chromeos/file_system_provider/operations/observe_directory.h
index 13a024b744c61dcb5d3709f5ec4b5b596237294b..e23852ce611a2807ab759cd1390fd84498213607 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/abort.h
+++ b/chrome/browser/chromeos/file_system_provider/operations/observe_directory.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_ABORT_H_
-#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_ABORT_H_
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OBSERVE_DIRECTORY_H_
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OBSERVE_DIRECTORY_H_
#include "base/files/file.h"
#include "base/memory/scoped_ptr.h"
@@ -25,14 +25,16 @@ namespace chromeos {
namespace file_system_provider {
namespace operations {
-// Aborts an operation. Created per request.
-class Abort : public Operation {
+// Observes a directory. If |recursive| is true, than also observes all of the
+// child entries in within, recursively.
+class ObserveDirectory : public Operation {
public:
- Abort(extensions::EventRouter* event_router,
- const ProvidedFileSystemInfo& file_system_info,
- int operation_request_id,
- const storage::AsyncFileUtil::StatusCallback& callback);
- virtual ~Abort();
+ ObserveDirectory(extensions::EventRouter* event_router,
+ const ProvidedFileSystemInfo& file_system_info,
+ const base::FilePath& directory_path,
+ bool recursive,
+ const storage::AsyncFileUtil::StatusCallback& callback);
+ virtual ~ObserveDirectory();
// Operation overrides.
virtual bool Execute(int request_id) override;
@@ -44,14 +46,15 @@ class Abort : public Operation {
base::File::Error error) override;
private:
- int operation_request_id_;
+ const base::FilePath directory_path_;
+ const bool recursive_;
const storage::AsyncFileUtil::StatusCallback callback_;
- DISALLOW_COPY_AND_ASSIGN(Abort);
+ DISALLOW_COPY_AND_ASSIGN(ObserveDirectory);
};
} // namespace operations
} // namespace file_system_provider
} // namespace chromeos
-#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_ABORT_H_
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OPERATIONS_OBSERVE_DIRECTORY_H_

Powered by Google App Engine
This is Rietveld 408576698