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

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

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test compilation. Created 6 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) 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"
11 #include "base/supports_user_data.h" 11 #include "base/supports_user_data.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/browser/zoom_level_prefs_store.h"
13 #include "content/public/common/push_messaging_status.h" 14 #include "content/public/common/push_messaging_status.h"
14 15
15 class GURL; 16 class GURL;
16 17
17 namespace base { 18 namespace base {
18 class FilePath; 19 class FilePath;
19 } 20 }
20 21
21 namespace fileapi { 22 namespace fileapi {
22 class ExternalMountPoints; 23 class ExternalMountPoints;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // thread before they use BrowserContext, they should call this to make sure 103 // thread before they use BrowserContext, they should call this to make sure
103 // that the ResourceContext is ready. 104 // that the ResourceContext is ready.
104 static void EnsureResourceContextInitialized(BrowserContext* browser_context); 105 static void EnsureResourceContextInitialized(BrowserContext* browser_context);
105 106
106 // Tells the HTML5 objects on this context to persist their session state 107 // Tells the HTML5 objects on this context to persist their session state
107 // across the next restart. 108 // across the next restart.
108 static void SaveSessionState(BrowserContext* browser_context); 109 static void SaveSessionState(BrowserContext* browser_context);
109 110
110 virtual ~BrowserContext(); 111 virtual ~BrowserContext();
111 112
113 // Override to provide for creation of a delegate that can be used to persist
114 // data stored in a HostZoomMap. The delegate is used to initialize the
115 // HostZoomMap and persist its information. This is called during creation
116 // of each StoragePartition.
117 virtual scoped_ptr<ZoomLevelPrefsStore> CreateZoomLevelPrefsStore();
118
112 // Returns the path of the directory where this context's data is stored. 119 // Returns the path of the directory where this context's data is stored.
113 virtual base::FilePath GetPath() const = 0; 120 virtual base::FilePath GetPath() const = 0;
114 121
115 // Return whether this context is incognito. Default is false. 122 // Return whether this context is incognito. Default is false.
116 virtual bool IsOffTheRecord() const = 0; 123 virtual bool IsOffTheRecord() const = 0;
117 124
118 // Returns the request context information associated with this context. Call 125 // Returns the request context information associated with this context. Call
119 // this only on the UI thread, since it can send notifications that should 126 // this only on the UI thread, since it can send notifications that should
120 // happen on the UI thread. 127 // happen on the UI thread.
121 // TODO(creis): Remove this version in favor of the one below. 128 // TODO(creis): Remove this version in favor of the one below.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 struct hash<content::BrowserContext*> { 182 struct hash<content::BrowserContext*> {
176 std::size_t operator()(content::BrowserContext* const& p) const { 183 std::size_t operator()(content::BrowserContext* const& p) const {
177 return reinterpret_cast<std::size_t>(p); 184 return reinterpret_cast<std::size_t>(p);
178 } 185 }
179 }; 186 };
180 187
181 } // namespace BASE_HASH_NAMESPACE 188 } // namespace BASE_HASH_NAMESPACE
182 #endif 189 #endif
183 190
184 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ 191 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698