Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / file_system_provider / watcher.cc
blobc2dc9a8b7009025c38d7c03561916db8d15c2dcc
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
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/file_system_provider/watcher.h"
7 namespace chromeos {
8 namespace file_system_provider {
10 WatcherKey::WatcherKey(const base::FilePath& entry_path, bool recursive)
11 : entry_path(entry_path), recursive(recursive) {
14 WatcherKey::~WatcherKey() {
17 bool WatcherKey::Comparator::operator()(const WatcherKey& a,
18 const WatcherKey& b) const {
19 if (a.entry_path != b.entry_path)
20 return a.entry_path < b.entry_path;
21 return a.recursive < b.recursive;
24 Subscriber::Subscriber() : persistent(false) {
27 Subscriber::~Subscriber() {
30 Watcher::Watcher() : recursive(false) {
33 Watcher::~Watcher() {
36 } // namespace file_system_provider
37 } // namespace chromeos