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

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

Issue 11234032: Webview tag creation should be using storage partitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disabling session storage test for isolated apps. 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_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 ResourceContext* context, 256 ResourceContext* context,
257 const std::vector<std::pair<int, int> >& render_views); 257 const std::vector<std::pair<int, int> >& render_views);
258 258
259 // Allow the embedder to override the request context based on the URL for 259 // Allow the embedder to override the request context based on the URL for
260 // certain operations, like cookie access. Returns NULL to indicate the 260 // certain operations, like cookie access. Returns NULL to indicate the
261 // regular request context should be used. 261 // regular request context should be used.
262 // This is called on the IO thread. 262 // This is called on the IO thread.
263 virtual net::URLRequestContext* OverrideRequestContextForURL( 263 virtual net::URLRequestContext* OverrideRequestContextForURL(
264 const GURL& url, ResourceContext* context); 264 const GURL& url, ResourceContext* context);
265 265
266 // Allow the embedder to specify storage parititon id associated with a child 266 // Allow the embedder to specify a string version of the storage partition
267 // process. 267 // config with a site.
268 //
269 // Child processes that have different storage partition identifiers will
270 // behave as if they belong to different web browsers and not be able to
271 // access each other's cookies, local storage, etc. IDs must only fit the
272 // pattern [a-z0-9]* (lowercase letters or digits).
273 //
274 // Returns the empty string for the regular storage partition.
275 virtual std::string GetStoragePartitionIdForChildProcess(
276 content::BrowserContext* browser_context,
277 int child_process_id);
278
279 // Same as GetStoragePartitionIdForChildProcess(), but uses a site instead.
280 //
281 // TODO(ajwong): Replace all uses of GetStoragePartitionIdForChildProcess()
282 // with this one.
283 virtual std::string GetStoragePartitionIdForSite( 268 virtual std::string GetStoragePartitionIdForSite(
284 content::BrowserContext* browser_context, 269 content::BrowserContext* browser_context,
285 const GURL& site); 270 const GURL& site);
286 271
287 // Allows the embedder to provide a validation check for |partition_id|s. 272 // Allows the embedder to provide a validation check for |partition_id|s.
288 // This domain of valid entries should match the range of outputs for 273 // This domain of valid entries should match the range of outputs for
289 // GetStoragePartitionIdForChildProcess(). 274 // GetStoragePartitionIdForChildProcess().
290 virtual bool IsValidStoragePartitionId(BrowserContext* browser_context, 275 virtual bool IsValidStoragePartitionId(BrowserContext* browser_context,
291 const std::string& partition_id); 276 const std::string& partition_id);
292 277
278 // Allows the embedder to provide a storage parititon configuration for a
279 // site. A storage partition configuration includes a domain of the embedder's
280 // choice, an optional name within that domain, and whether the partition is
281 // in-memory only. The |partition_domain| is [a-z]* UTF-8 string, specifying
282 // the domain in which partitions live (similar to namespace). Within a
283 // domain, partitions can be uniquely identified by the combination of
284 // |partition_name| and |in_memory| values. When a partition is not to be
285 // persisted, the |in_memory| value must be set to true.
286 virtual void GetStoragePartitionConfigForSite(
287 content::BrowserContext* browser_context,
288 const GURL& site,
289 std::string* partition_domain,
290 std::string* partition_name,
291 bool* in_memory);
292
293 // Create and return a new quota permission context. 293 // Create and return a new quota permission context.
294 virtual QuotaPermissionContext* CreateQuotaPermissionContext(); 294 virtual QuotaPermissionContext* CreateQuotaPermissionContext();
295 295
296 // Open the given file in the desktop's default manner. 296 // Open the given file in the desktop's default manner.
297 virtual void OpenItem(const FilePath& path) {} 297 virtual void OpenItem(const FilePath& path) {}
298 298
299 // Show the given file in a file manager. If possible, select the file. 299 // Show the given file in a file manager. If possible, select the file.
300 virtual void ShowItemInFolder(const FilePath& path) {} 300 virtual void ShowItemInFolder(const FilePath& path) {}
301 301
302 // Informs the embedder that a certificate error has occured. If 302 // Informs the embedder that a certificate error has occured. If
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 // This is called on a worker thread. 472 // This is called on a worker thread.
473 virtual 473 virtual
474 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( 474 crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate(
475 const GURL& url); 475 const GURL& url);
476 #endif 476 #endif
477 }; 477 };
478 478
479 } // namespace content 479 } // namespace content
480 480
481 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 481 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/public/browser/browser_context.h ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698