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

Side by Side Diff: content/public/browser/browser_context.h

Issue 266373006: Blobs: Mechanism for creating Blobs in browser process, then transferring to renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move typedef Created 6 years, 7 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 | « content/public/browser/blob_handle.h ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 13 matching lines...) Expand all
24 namespace net { 24 namespace net {
25 class URLRequestContextGetter; 25 class URLRequestContextGetter;
26 } 26 }
27 27
28 namespace quota { 28 namespace quota {
29 class SpecialStoragePolicy; 29 class SpecialStoragePolicy;
30 } 30 }
31 31
32 namespace content { 32 namespace content {
33 33
34 class BlobHandle;
34 class BrowserPluginGuestManager; 35 class BrowserPluginGuestManager;
35 class DownloadManager; 36 class DownloadManager;
36 class DownloadManagerDelegate; 37 class DownloadManagerDelegate;
37 class GeolocationPermissionContext; 38 class GeolocationPermissionContext;
38 class IndexedDBContext; 39 class IndexedDBContext;
39 class ResourceContext; 40 class ResourceContext;
40 class SiteInstance; 41 class SiteInstance;
41 class StoragePartition; 42 class StoragePartition;
42 43
43 // This class holds the context needed for a browsing session. 44 // This class holds the context needed for a browsing session.
(...skipping 26 matching lines...) Expand all
70 static void GarbageCollectStoragePartitions( 71 static void GarbageCollectStoragePartitions(
71 BrowserContext* browser_context, 72 BrowserContext* browser_context,
72 scoped_ptr<base::hash_set<base::FilePath> > active_paths, 73 scoped_ptr<base::hash_set<base::FilePath> > active_paths,
73 const base::Closure& done); 74 const base::Closure& done);
74 75
75 // DON'T USE THIS. GetDefaultStoragePartition() is going away. 76 // DON'T USE THIS. GetDefaultStoragePartition() is going away.
76 // Use GetStoragePartition() instead. Ask ajwong@ if you have problems. 77 // Use GetStoragePartition() instead. Ask ajwong@ if you have problems.
77 static content::StoragePartition* GetDefaultStoragePartition( 78 static content::StoragePartition* GetDefaultStoragePartition(
78 BrowserContext* browser_context); 79 BrowserContext* browser_context);
79 80
81 typedef base::Callback<void(scoped_ptr<BlobHandle>)> BlobCallback;
82
83 // |callback| returns a NULL scoped_ptr on failure.
84 static void CreateMemoryBackedBlob(BrowserContext* browser_context,
85 const char* data, size_t length,
86 const BlobCallback& callback);
87
80 // Ensures that the corresponding ResourceContext is initialized. Normally the 88 // Ensures that the corresponding ResourceContext is initialized. Normally the
81 // BrowserContext initializs the corresponding getters when its objects are 89 // BrowserContext initializs the corresponding getters when its objects are
82 // created, but if the embedder wants to pass the ResourceContext to another 90 // created, but if the embedder wants to pass the ResourceContext to another
83 // thread before they use BrowserContext, they should call this to make sure 91 // thread before they use BrowserContext, they should call this to make sure
84 // that the ResourceContext is ready. 92 // that the ResourceContext is ready.
85 static void EnsureResourceContextInitialized(BrowserContext* browser_context); 93 static void EnsureResourceContextInitialized(BrowserContext* browser_context);
86 94
87 // Tells the HTML5 objects on this context to persist their session state 95 // Tells the HTML5 objects on this context to persist their session state
88 // across the next restart. 96 // across the next restart.
89 static void SaveSessionState(BrowserContext* browser_context); 97 static void SaveSessionState(BrowserContext* browser_context);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 struct hash<content::BrowserContext*> { 194 struct hash<content::BrowserContext*> {
187 std::size_t operator()(content::BrowserContext* const& p) const { 195 std::size_t operator()(content::BrowserContext* const& p) const {
188 return reinterpret_cast<std::size_t>(p); 196 return reinterpret_cast<std::size_t>(p);
189 } 197 }
190 }; 198 };
191 199
192 } // namespace BASE_HASH_NAMESPACE 200 } // namespace BASE_HASH_NAMESPACE
193 #endif 201 #endif
194 202
195 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 203 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/public/browser/blob_handle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698