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

Side by Side Diff: webkit/browser/fileapi/file_update_observer.h

Issue 26280007: Split file_observers.h into three files for each class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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.
4
5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_UPDATE_OBSERVER_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_UPDATE_OBSERVER_H_
7
8 #include "base/basictypes.h"
9
10 namespace fileapi {
11
12 class FileSystemURL;
13
14 // An abstract interface to observe update operations.
15 //
16 // OnStartUpdate and OnEndUpdate are called once for each target url
17 // before and after following operations regardless of whether the operation
18 // is made recursively or not (i.e. StartUpdate() will be called only once
19 // for destination url regardless of whether it is recursive copy or not):
20 // CreateFile(), CreateDirectory(),
21 // Copy() (destination only),
22 // Move() (both for source and destination),
23 // Remove(), Write(), Truncate(), TouchFile()
24 //
25 // OnUpdate() is called each time the |url| is updated but works only for
26 // sandboxed files (where usage is tracked).
27 class FileUpdateObserver {
28 public:
29 FileUpdateObserver() {}
30 virtual ~FileUpdateObserver() {}
31
32 virtual void OnStartUpdate(const FileSystemURL& url) = 0;
33 virtual void OnUpdate(const FileSystemURL& url, int64 delta) = 0;
34 virtual void OnEndUpdate(const FileSystemURL& url) = 0;
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(FileUpdateObserver);
38 };
39
40 } // namespace fileapi
41
42 #endif // WEBKIT_BROWSER_FILEAPI_FILE_UPDATE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698