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

Side by Side Diff: chrome/browser/renderer_host/blob_dispatcher_host.h

Issue 5698008: Switch a bunch of remaining filters to derive from BrowserMessageFilters so t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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 (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_BLOB_DISPATCHER_HOST_H_
6 #define CHROME_BROWSER_RENDERER_HOST_BLOB_DISPATCHER_HOST_H_
7
8 #include "base/hash_tables.h"
9 #include "base/ref_counted.h"
10
11 class ChromeBlobStorageContext;
12 class GURL;
13
14 namespace IPC {
15 class Message;
16 }
17
18 namespace webkit_blob {
19 class BlobData;
20 }
21
22 class BlobDispatcherHost {
23 public:
24 BlobDispatcherHost(int process_id,
25 ChromeBlobStorageContext* blob_storage_context);
26 ~BlobDispatcherHost();
27
28 void Shutdown();
29 bool OnMessageReceived(const IPC::Message& message, bool* msg_is_ok);
30
31 private:
32 void OnRegisterBlobUrl(const GURL& url,
33 const scoped_refptr<webkit_blob::BlobData>& blob_data);
34 void OnRegisterBlobUrlFrom(const GURL& url, const GURL& src_url);
35 void OnUnregisterBlobUrl(const GURL& url);
36
37 bool CheckPermission(webkit_blob::BlobData* blob_data) const;
38
39 int process_id_;
40 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
41
42 // Keep track of blob URLs registered in this process. Need to unregister
43 // all of them when the renderer process dies.
44 base::hash_set<std::string> blob_urls_;
45
46 DISALLOW_IMPLICIT_CONSTRUCTORS(BlobDispatcherHost);
47 };
48
49 #endif // CHROME_BROWSER_RENDERER_HOST_BLOB_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/mime_registry_message_filter.cc ('k') | chrome/browser/renderer_host/blob_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698