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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/observed_entry.cc

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, 1 month 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 unified diff | Download patch
OLDNEW
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/observed_entry.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 ObservedEntryKey::ObservedEntryKey(const base::FilePath& entry_path,
11 bool recursive) 11 bool recursive)
12 : entry_path(entry_path), recursive(recursive) { 12 : entry_path(entry_path), recursive(recursive) {
13 } 13 }
14 14
15 ObservedEntryKey::~ObservedEntryKey() { 15 ObservedEntryKey::~ObservedEntryKey() {
16 } 16 }
17 17
18 bool ObservedEntryKey::Comparator::operator()(const ObservedEntryKey& a, 18 bool ObservedEntryKey::Comparator::operator()(const ObservedEntryKey& a,
19 const ObservedEntryKey& b) const { 19 const ObservedEntryKey& b) const {
20 if (a.entry_path != b.entry_path) 20 if (a.entry_path != b.entry_path)
21 return a.entry_path < b.entry_path; 21 return a.entry_path < b.entry_path;
22 return a.recursive < b.recursive; 22 return a.recursive < b.recursive;
23 } 23 }
24 24
25 Subscriber::Subscriber() : persistent(false) {
26 }
27
28 Subscriber::~Subscriber() {
29 }
30
25 ObservedEntry::ObservedEntry() : recursive(false) { 31 ObservedEntry::ObservedEntry() : recursive(false) {
26 } 32 }
27 33
28 ObservedEntry::~ObservedEntry() { 34 ObservedEntry::~ObservedEntry() {
29 } 35 }
30 36
31 } // namespace file_system_provider 37 } // namespace file_system_provider
32 } // namespace chromeos 38 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698