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

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

Issue 11234032: Webview tag creation should be using storage partitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for all comments so far. Created 8 years, 1 month 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) 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/hash_tables.h" 9 #include "base/hash_tables.h"
10 #include "base/supports_user_data.h" 10 #include "base/supports_user_data.h"
(...skipping 21 matching lines...) Expand all
32 class SpeechRecognitionPreferences; 32 class SpeechRecognitionPreferences;
33 class StoragePartition; 33 class StoragePartition;
34 34
35 // This class holds the context needed for a browsing session. 35 // This class holds the context needed for a browsing session.
36 // It lives on the UI thread. All these methods must only be called on the UI 36 // It lives on the UI thread. All these methods must only be called on the UI
37 // thread. 37 // thread.
38 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { 38 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
39 public: 39 public:
40 // Used in ForEachStoragePartition(). The first argument is the partition id. 40 // Used in ForEachStoragePartition(). The first argument is the partition id.
41 // The second argument is the StoragePartition object for that partition id. 41 // The second argument is the StoragePartition object for that partition id.
42 typedef base::Callback<void(const std::string&, StoragePartition*)> 42 typedef base::Callback<void(StoragePartition*)> StoragePartitionCallback;
43 StoragePartitionCallback;
44 43
45 static DownloadManager* GetDownloadManager(BrowserContext* browser_context); 44 static DownloadManager* GetDownloadManager(BrowserContext* browser_context);
46 45
47 static content::StoragePartition* GetStoragePartition( 46 static content::StoragePartition* GetStoragePartition(
48 BrowserContext* browser_context, SiteInstance* site_instance); 47 BrowserContext* browser_context, SiteInstance* site_instance);
49 static content::StoragePartition* GetStoragePartitionForSite( 48 static content::StoragePartition* GetStoragePartitionForSite(
50 BrowserContext* browser_context, const GURL& site); 49 BrowserContext* browser_context, const GURL& site);
51 static void ForEachStoragePartition( 50 static void ForEachStoragePartition(
52 BrowserContext* browser_context, 51 BrowserContext* browser_context,
53 const StoragePartitionCallback& callback); 52 const StoragePartitionCallback& callback);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 struct hash<content::BrowserContext*> { 140 struct hash<content::BrowserContext*> {
142 std::size_t operator()(content::BrowserContext* const& p) const { 141 std::size_t operator()(content::BrowserContext* const& p) const {
143 return reinterpret_cast<std::size_t>(p); 142 return reinterpret_cast<std::size_t>(p);
144 } 143 }
145 }; 144 };
146 145
147 } // namespace BASE_HASH_NAMESPACE 146 } // namespace BASE_HASH_NAMESPACE
148 #endif 147 #endif
149 148
150 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 149 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698