| 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 #include "chrome/browser/chromeos/file_system_provider/observed_entry.h" | 5 #include "chrome/browser/chromeos/file_system_provider/watcher.h" |
| 6 | 6 |
| 7 namespace chromeos { | 7 namespace chromeos { |
| 8 namespace file_system_provider { | 8 namespace file_system_provider { |
| 9 | 9 |
| 10 ObservedEntryKey::ObservedEntryKey(const base::FilePath& entry_path, | 10 WatcherKey::WatcherKey(const base::FilePath& entry_path, bool recursive) |
| 11 bool recursive) | |
| 12 : entry_path(entry_path), recursive(recursive) { | 11 : entry_path(entry_path), recursive(recursive) { |
| 13 } | 12 } |
| 14 | 13 |
| 15 ObservedEntryKey::~ObservedEntryKey() { | 14 WatcherKey::~WatcherKey() { |
| 16 } | 15 } |
| 17 | 16 |
| 18 bool ObservedEntryKey::Comparator::operator()(const ObservedEntryKey& a, | 17 bool WatcherKey::Comparator::operator()(const WatcherKey& a, |
| 19 const ObservedEntryKey& b) const { | 18 const WatcherKey& b) const { |
| 20 if (a.entry_path != b.entry_path) | 19 if (a.entry_path != b.entry_path) |
| 21 return a.entry_path < b.entry_path; | 20 return a.entry_path < b.entry_path; |
| 22 return a.recursive < b.recursive; | 21 return a.recursive < b.recursive; |
| 23 } | 22 } |
| 24 | 23 |
| 25 Subscriber::Subscriber() : persistent(false) { | 24 Subscriber::Subscriber() : persistent(false) { |
| 26 } | 25 } |
| 27 | 26 |
| 28 Subscriber::~Subscriber() { | 27 Subscriber::~Subscriber() { |
| 29 } | 28 } |
| 30 | 29 |
| 31 ObservedEntry::ObservedEntry() : recursive(false) { | 30 Watcher::Watcher() : recursive(false) { |
| 32 } | 31 } |
| 33 | 32 |
| 34 ObservedEntry::~ObservedEntry() { | 33 Watcher::~Watcher() { |
| 35 } | 34 } |
| 36 | 35 |
| 37 } // namespace file_system_provider | 36 } // namespace file_system_provider |
| 38 } // namespace chromeos | 37 } // namespace chromeos |
| OLD | NEW |