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

Unified Diff: chrome/browser/chromeos/file_system_provider/provided_file_system.h

Issue 642023003: [fsp] Allow to create multiple observers for a directory, up to one per origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments + fixed tests. 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/provided_file_system.h
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system.h b/chrome/browser/chromeos/file_system_provider/provided_file_system.h
index 8e5d11e7bbb543b38e2c8789ae1f7fca35a545f7..4e49860f7fc6745a081fa9eefdf7f2eb14e2e753 100644
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system.h
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system.h
@@ -16,6 +16,7 @@
#include "chrome/browser/chromeos/file_system_provider/provided_file_system_observer.h"
#include "chrome/browser/chromeos/file_system_provider/request_manager.h"
#include "storage/browser/fileapi/async_file_util.h"
+#include "url/gurl.h"
class Profile;
@@ -137,10 +138,13 @@ class ProvidedFileSystem : public ProvidedFileSystemInterface {
int length,
const storage::AsyncFileUtil::StatusCallback& callback) override;
virtual AbortCallback ObserveDirectory(
+ const GURL& origin,
const base::FilePath& directory_path,
bool recursive,
+ bool persistent,
const storage::AsyncFileUtil::StatusCallback& callback) override;
virtual void UnobserveEntry(
+ const GURL& origin,
const base::FilePath& entry_path,
bool recursive,
const storage::AsyncFileUtil::StatusCallback& callback) override;
@@ -163,10 +167,13 @@ class ProvidedFileSystem : public ProvidedFileSystemInterface {
void Abort(int operation_request_id,
const storage::AsyncFileUtil::StatusCallback& callback);
- // Called when a directory becomes watched successfully.
+ // Called when observing a directory process is completed with either success
+ // or en error.
void OnObserveDirectoryCompleted(
+ const GURL& origin,
const base::FilePath& directory_path,
bool recursive,
+ bool persistent,
const storage::AsyncFileUtil::StatusCallback& callback,
base::File::Error result);

Powered by Google App Engine
This is Rietveld 408576698