Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVED_ENTRY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVED_ENTRY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVED_ENTRY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVED_ENTRY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | |
|
hirono
2014/10/22 06:00:35
Is this used?
mtomasz
2014/10/24 05:48:42
Done.
| |
| 9 #include <string> | 10 #include <string> |
| 10 | 11 |
| 11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "url/gurl.h" | |
| 12 | 14 |
| 13 namespace chromeos { | 15 namespace chromeos { |
| 14 namespace file_system_provider { | 16 namespace file_system_provider { |
| 15 | 17 |
| 16 struct ObservedEntry; | 18 struct ObservedEntry; |
| 19 struct Subscriber; | |
| 17 | 20 |
| 18 // List of observed entries. | 21 // Map of subscribers for notifications about an observed entry. |
| 22 typedef std::map<GURL, Subscriber> Subscribers; | |
| 23 | |
| 24 // Map of observed entries. | |
| 19 typedef std::map<base::FilePath, ObservedEntry> ObservedEntries; | 25 typedef std::map<base::FilePath, ObservedEntry> ObservedEntries; |
| 20 | 26 |
| 27 // Represents a subscriber for notification about an observed entry. There may | |
| 28 // be up to one subscriber per origin for the same observed entry. | |
| 29 struct Subscriber { | |
| 30 Subscriber(); | |
| 31 ~Subscriber(); | |
| 32 | |
| 33 GURL origin; | |
| 34 bool persistent; | |
| 35 }; | |
| 36 | |
| 21 // Represents an observed entry on a file system. | 37 // Represents an observed entry on a file system. |
| 22 struct ObservedEntry { | 38 struct ObservedEntry { |
| 23 ObservedEntry(); | 39 ObservedEntry(); |
| 24 ~ObservedEntry(); | 40 ~ObservedEntry(); |
| 25 | 41 |
| 42 // Map of subscribers for notifications of the observed entry. | |
| 43 Subscribers subscribers; | |
| 44 | |
| 45 // Path of the observed entry. | |
| 26 base::FilePath entry_path; | 46 base::FilePath entry_path; |
| 47 | |
| 48 // Whether observing is recursive or not. | |
| 27 bool recursive; | 49 bool recursive; |
| 50 | |
| 51 // Tag of the last notification for this observed entry. May be empty if not | |
| 52 // supported. | |
| 28 std::string last_tag; | 53 std::string last_tag; |
| 29 }; | 54 }; |
| 30 | 55 |
| 31 } // namespace file_system_provider | 56 } // namespace file_system_provider |
| 32 } // namespace chromeos | 57 } // namespace chromeos |
| 33 | 58 |
| 34 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVED_ENTRY_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVED_ENTRY_H_ |
| OLD | NEW |