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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fake_provided_file_system.h

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
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H _ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H _
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H _ 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H _
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/linked_ptr.h" 13 #include "base/memory/linked_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/task/cancelable_task_tracker.h" 16 #include "base/task/cancelable_task_tracker.h"
17 #include "chrome/browser/chromeos/file_system_provider/observed_entry.h" 17 #include "chrome/browser/chromeos/file_system_provider/observed_entry.h"
18 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info .h" 18 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info .h"
19 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte rface.h" 19 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte rface.h"
20 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_obse rver.h" 20 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_obse rver.h"
21 #include "url/gurl.h"
21 22
22 class Profile; 23 class Profile;
23 24
24 namespace base { 25 namespace base {
25 class Time; 26 class Time;
26 } // namespace base 27 } // namespace base
27 28
28 namespace net { 29 namespace net {
29 class IOBuffer; 30 class IOBuffer;
30 } // namespace net 31 } // namespace net
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 const base::FilePath& file_path, 120 const base::FilePath& file_path,
120 int64 length, 121 int64 length,
121 const storage::AsyncFileUtil::StatusCallback& callback) override; 122 const storage::AsyncFileUtil::StatusCallback& callback) override;
122 virtual AbortCallback WriteFile( 123 virtual AbortCallback WriteFile(
123 int file_handle, 124 int file_handle,
124 net::IOBuffer* buffer, 125 net::IOBuffer* buffer,
125 int64 offset, 126 int64 offset,
126 int length, 127 int length,
127 const storage::AsyncFileUtil::StatusCallback& callback) override; 128 const storage::AsyncFileUtil::StatusCallback& callback) override;
128 virtual AbortCallback ObserveDirectory( 129 virtual AbortCallback ObserveDirectory(
130 const GURL& origin,
129 const base::FilePath& directory_path, 131 const base::FilePath& directory_path,
130 bool recursive, 132 bool recursive,
133 bool persistent,
131 const storage::AsyncFileUtil::StatusCallback& callback) override; 134 const storage::AsyncFileUtil::StatusCallback& callback) override;
132 virtual void UnobserveEntry( 135 virtual void UnobserveEntry(
136 const GURL& origin,
133 const base::FilePath& entry_path, 137 const base::FilePath& entry_path,
134 bool recursive, 138 bool recursive,
135 const storage::AsyncFileUtil::StatusCallback& callback) override; 139 const storage::AsyncFileUtil::StatusCallback& callback) override;
136 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const override; 140 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const override;
137 virtual RequestManager* GetRequestManager() override; 141 virtual RequestManager* GetRequestManager() override;
138 virtual ObservedEntries* GetObservedEntries() override; 142 virtual ObservedEntries* GetObservedEntries() override;
139 virtual void AddObserver(ProvidedFileSystemObserver* observer) override; 143 virtual void AddObserver(ProvidedFileSystemObserver* observer) override;
140 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) override; 144 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) override;
141 virtual bool Notify(const base::FilePath& observed_path, 145 virtual bool Notify(const base::FilePath& observed_path,
142 bool recursive, 146 bool recursive,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ObservedEntries observed_entries_; 183 ObservedEntries observed_entries_;
180 184
181 base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; 185 base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_;
182 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); 186 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem);
183 }; 187 };
184 188
185 } // namespace file_system_provider 189 } // namespace file_system_provider
186 } // namespace chromeos 190 } // namespace chromeos
187 191
188 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE M_H_ 192 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE M_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698