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

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

Issue 7618039: PPB_URLRequestInfo::AppendFileToBody using sync ipc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 4 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 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/browser/browser_message_filter.h" 12 #include "content/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 GURL; 16 class GURL;
16 class Receiver; 17 class Receiver;
17 class RenderMessageFilter; 18 class RenderMessageFilter;
18 19
19 namespace base { 20 namespace base {
20 class Time; 21 class Time;
21 } 22 }
22 23
23 namespace content { 24 namespace content {
24 class ResourceContext; 25 class ResourceContext;
(...skipping 13 matching lines...) Expand all
38 // Used by the renderer. 39 // Used by the renderer.
39 explicit FileSystemDispatcherHost( 40 explicit FileSystemDispatcherHost(
40 const content::ResourceContext* resource_context); 41 const content::ResourceContext* resource_context);
41 // Used by the worker, since it has the context handy already. 42 // Used by the worker, since it has the context handy already.
42 FileSystemDispatcherHost(net::URLRequestContext* request_context, 43 FileSystemDispatcherHost(net::URLRequestContext* request_context,
43 fileapi::FileSystemContext* file_system_context); 44 fileapi::FileSystemContext* file_system_context);
44 virtual ~FileSystemDispatcherHost(); 45 virtual ~FileSystemDispatcherHost();
45 46
46 // BrowserMessageFilter implementation. 47 // BrowserMessageFilter implementation.
47 virtual void OnChannelConnected(int32 peer_pid); 48 virtual void OnChannelConnected(int32 peer_pid);
49 virtual void OverrideThreadForMessage(const IPC::Message& message,
50 BrowserThread::ID* thread);
ericu 2011/08/17 01:14:31 How about an OVERRIDE tag here?
kinuko 2011/08/17 07:55:28 Done.
48 virtual bool OnMessageReceived(const IPC::Message& message, 51 virtual bool OnMessageReceived(const IPC::Message& message,
49 bool* message_was_ok); 52 bool* message_was_ok);
50 53
51 void UnregisterOperation(int request_id); 54 void UnregisterOperation(int request_id);
52 55
53 private: 56 private:
54 void OnOpen(int request_id, 57 void OnOpen(int request_id,
55 const GURL& origin_url, 58 const GURL& origin_url,
56 fileapi::FileSystemType type, 59 fileapi::FileSystemType type,
57 int64 requested_size, 60 int64 requested_size,
(...skipping 19 matching lines...) Expand all
77 int64 offset); 80 int64 offset);
78 void OnTruncate(int request_id, const GURL& path, int64 length); 81 void OnTruncate(int request_id, const GURL& path, int64 length);
79 void OnTouchFile(int request_id, 82 void OnTouchFile(int request_id,
80 const GURL& path, 83 const GURL& path,
81 const base::Time& last_access_time, 84 const base::Time& last_access_time,
82 const base::Time& last_modified_time); 85 const base::Time& last_modified_time);
83 void OnCancel(int request_id, int request_to_cancel); 86 void OnCancel(int request_id, int request_to_cancel);
84 void OnOpenFile(int request_id, const GURL& path, int file_flags); 87 void OnOpenFile(int request_id, const GURL& path, int file_flags);
85 void OnWillUpdate(const GURL& path); 88 void OnWillUpdate(const GURL& path);
86 void OnDidUpdate(const GURL& path, int64 delta); 89 void OnDidUpdate(const GURL& path, int64 delta);
90 void OnSyncGetPlatformPath(const GURL& path,
91 FilePath* platform_path);
87 92
88 // Creates a new FileSystemOperation. 93 // Creates a new FileSystemOperation.
89 fileapi::FileSystemOperation* GetNewOperation(int request_id); 94 fileapi::FileSystemOperation* GetNewOperation(int request_id);
90 95
91 fileapi::FileSystemContext* context_; 96 fileapi::FileSystemContext* context_;
92 97
93 // Keeps ongoing file system operations. 98 // Keeps ongoing file system operations.
94 typedef IDMap<fileapi::FileSystemOperation> OperationsMap; 99 typedef IDMap<fileapi::FileSystemOperation> OperationsMap;
95 OperationsMap operations_; 100 OperationsMap operations_;
96 101
97 // This holds the ResourceContext until Init() can be called from the 102 // This holds the ResourceContext until Init() can be called from the
98 // IO thread, which will extract the net::URLRequestContext from it. 103 // IO thread, which will extract the net::URLRequestContext from it.
99 const content::ResourceContext* resource_context_; 104 const content::ResourceContext* resource_context_;
100 net::URLRequestContext* request_context_; 105 net::URLRequestContext* request_context_;
101 106
102 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost); 107 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcherHost);
103 }; 108 };
104 109
105 #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') | net/base/upload_data_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698