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

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

Issue 679573002: [fsp] Separate recursive and non-recursive watchers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. 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/observed_entry.h
diff --git a/chrome/browser/chromeos/file_system_provider/observed_entry.h b/chrome/browser/chromeos/file_system_provider/observed_entry.h
index c42f3d7312f991a996002702b2083b925793c6d6..f34d1b073cdac94353fd9b7a835c2340ff34c3b7 100644
--- a/chrome/browser/chromeos/file_system_provider/observed_entry.h
+++ b/chrome/browser/chromeos/file_system_provider/observed_entry.h
@@ -15,8 +15,23 @@ namespace file_system_provider {
struct ObservedEntry;
+// Key for storing an observed entry in the map. There may be two observers
+// per path, as long as one is recursive, and the other one not.
+struct ObservedEntryKey {
+ ObservedEntryKey(const base::FilePath& entry_path, bool recursive);
+ ~ObservedEntryKey();
+
+ struct Comparator {
+ bool operator()(const ObservedEntryKey& a, const ObservedEntryKey& b) const;
+ };
+
+ base::FilePath entry_path;
+ bool recursive;
+};
+
// List of observed entries.
-typedef std::map<base::FilePath, ObservedEntry> ObservedEntries;
+typedef std::map<ObservedEntryKey, ObservedEntry, ObservedEntryKey::Comparator>
+ ObservedEntries;
// Represents an observed entry on a file system.
struct ObservedEntry {

Powered by Google App Engine
This is Rietveld 408576698