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

Side by Side Diff: webkit/fileapi/file_system_usage_tracker.h

Issue 6603034: Stop returning the true root path of each filesystem from openFileSystem.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_TRACKER_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_TRACKER_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_TRACKER_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_TRACKER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/file_path.h" 15 #include "base/file_path.h"
16 #include "base/ref_counted.h" 16 #include "base/ref_counted.h"
17 #include "webkit/fileapi/file_system_types.h" 17 #include "webkit/fileapi/file_system_types.h"
18 18
19 class GURL; 19 class GURL;
20 20
21 namespace base { 21 namespace base {
22 class MessageLoopProxy; 22 class MessageLoopProxy;
23 } 23 }
24 24
25 namespace fileapi { 25 namespace fileapi {
26 26
27 // Owned by the SandboxedFileSystemContext, which is a per-profile 27 // Owned by the FileSystemContext, which is a per-profile instance, and has the
28 // instance, and has the same lifetime as the SandboxedFileSystemContext. 28 // same lifetime as the FileSystemContext. It's going to be created and
29 // It's going to be created and destroyed on the IO thread in chrome. 29 // destroyed on the IO thread in chrome. (The destruction on the same thread
30 // (The destruction on the same thread where it is created was guaranteed 30 // where it is created was guaranteed by its owner, FileSystemContext.)
31 // by its owner, SandboxedFileSystemContext.) 31 // TODO(ericu): Tie this more to the SandboxMountPointProvider and less to the
32 // FileSystemContext.
kinuko 2011/03/22 00:16:24 This class will need to be overhauled anyway, I th
ericu 2011/03/22 00:40:31 Done.
32 class FileSystemUsageTracker { 33 class FileSystemUsageTracker {
33 public: 34 public:
34 FileSystemUsageTracker( 35 FileSystemUsageTracker(
35 scoped_refptr<base::MessageLoopProxy> file_message_loop, 36 scoped_refptr<base::MessageLoopProxy> file_message_loop,
36 const FilePath& profile_path, 37 const FilePath& profile_path,
37 bool is_incognito); 38 bool is_incognito);
38 ~FileSystemUsageTracker(); 39 ~FileSystemUsageTracker();
39 40
40 // Get the amount of data stored in the filesystem specified by 41 // Get the amount of data stored in the filesystem specified by
41 // |origin_url| and |type|. 42 // |origin_url| and |type|.
(...skipping 20 matching lines...) Expand all
62 typedef std::list<GetUsageCallback*> PendingCallbackList; 63 typedef std::list<GetUsageCallback*> PendingCallbackList;
63 typedef std::map<std::string, PendingCallbackList> PendingUsageCallbackMap; 64 typedef std::map<std::string, PendingCallbackList> PendingUsageCallbackMap;
64 PendingUsageCallbackMap pending_usage_callbacks_; 65 PendingUsageCallbackMap pending_usage_callbacks_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(FileSystemUsageTracker); 67 DISALLOW_COPY_AND_ASSIGN(FileSystemUsageTracker);
67 }; 68 };
68 69
69 } // namespace fileapi 70 } // namespace fileapi
70 71
71 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_TRACKER_H_ 72 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_USAGE_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698