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

Side by Side Diff: content/browser/file_system/file_system_dispatcher_host.h

Issue 8999017: Add CreateFileSystemOperation() method to FileSystemContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang build fix Created 8 years, 11 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
« no previous file with comments | « no previous file | content/browser/file_system/file_system_dispatcher_host.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 (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 CONTENT_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/id_map.h" 11 #include "base/id_map.h"
12 #include "content/public/browser/browser_message_filter.h" 12 #include "content/public/browser/browser_message_filter.h"
13 #include "webkit/fileapi/file_system_types.h" 13 #include "webkit/fileapi/file_system_types.h"
14 14
15 class FilePath; 15 class FilePath;
16 class GURL; 16 class GURL;
17 17
18 namespace base { 18 namespace base {
19 class Time; 19 class Time;
20 } 20 }
21 21
22 namespace fileapi { 22 namespace fileapi {
23 class FileSystemContext; 23 class FileSystemContext;
24 class FileSystemOperation; 24 class FileSystemOperationInterface;
25 } 25 }
26 26
27 namespace net { 27 namespace net {
28 class URLRequestContext; 28 class URLRequestContext;
29 class URLRequestContextGetter; 29 class URLRequestContextGetter;
30 } // namespace net 30 } // namespace net
31 31
32 class FileSystemDispatcherHost : public content::BrowserMessageFilter { 32 class FileSystemDispatcherHost : public content::BrowserMessageFilter {
33 public: 33 public:
34 // Used by the renderer process host on the UI thread. 34 // Used by the renderer process host on the UI thread.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 const GURL& path, 81 const GURL& path,
82 const base::Time& last_access_time, 82 const base::Time& last_access_time,
83 const base::Time& last_modified_time); 83 const base::Time& last_modified_time);
84 void OnCancel(int request_id, int request_to_cancel); 84 void OnCancel(int request_id, int request_to_cancel);
85 void OnOpenFile(int request_id, const GURL& path, int file_flags); 85 void OnOpenFile(int request_id, const GURL& path, int file_flags);
86 void OnWillUpdate(const GURL& path); 86 void OnWillUpdate(const GURL& path);
87 void OnDidUpdate(const GURL& path, int64 delta); 87 void OnDidUpdate(const GURL& path, int64 delta);
88 void OnSyncGetPlatformPath(const GURL& path, 88 void OnSyncGetPlatformPath(const GURL& path,
89 FilePath* platform_path); 89 FilePath* platform_path);
90 90
91 // Creates a new FileSystemOperation. 91 // Creates a new FileSystemOperationInterface based on |target_path|.
92 fileapi::FileSystemOperation* GetNewOperation(int request_id); 92 fileapi::FileSystemOperationInterface* GetNewOperation(
93 const GURL& target_path,
94 int request_id);
93 95
94 fileapi::FileSystemContext* context_; 96 fileapi::FileSystemContext* context_;
95 97
96 // Keeps ongoing file system operations. 98 // Keeps ongoing file system operations.
97 typedef IDMap<fileapi::FileSystemOperation> OperationsMap; 99 typedef IDMap<fileapi::FileSystemOperationInterface> OperationsMap;
98 OperationsMap operations_; 100 OperationsMap operations_;
99 101
100 // The getter holds the context until Init() can be called from the 102 // The getter holds the context until Init() can be called from the
101 // IO thread, which will extract the net::URLRequestContext from it. 103 // IO thread, which will extract the net::URLRequestContext from it.
102 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 104 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
103 net::URLRequestContext* request_context_; 105 net::URLRequestContext* request_context_;
104 106
105 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost); 107 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost);
106 }; 108 };
107 109
108 #endif // CONTENT_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_ 110 #endif // CONTENT_BROWSER_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/file_system/file_system_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698