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

Unified Diff: content/browser/storage_partition_impl.h

Issue 11366140: Fix on-disk structure for persistent storage in webview tags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/storage_partition_impl.h
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h
index f32d88dec56c79ff55f6f606ad9c9162834862f1..3989a50a88bdcf1562f5fa983bc5ec465b515b8f 100644
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -17,30 +17,6 @@ namespace content {
class StoragePartitionImpl : public StoragePartition {
public:
- // Each StoragePartition is uniquely identified by which partition domain
- // it belongs to (such as an app or the browser itself), the user supplied
- // partition name and the bit indicating whether it should be persisted on
- // disk or not. This structure contains those elements and is used as
- // uniqueness key to lookup StoragePartition objects in the global map.
- //
- // TODO(nasko): It is equivalent, though not identical to the same structure
- // that lives in chrome profiles. The difference is that this one has
- // partition_domain and partition_name separate, while the latter one has
- // the path produced by combining the two pieces together.
- // The fix for http://crbug.com/159193 will remove the chrome version.
- struct StoragePartitionDescriptor {
- const std::string partition_domain;
- const std::string partition_name;
- const bool in_memory;
-
- StoragePartitionDescriptor(const std::string& domain,
- const std::string& partition,
- const bool& in_memory_only)
- : partition_domain(domain),
- partition_name(partition),
- in_memory(in_memory_only) {}
- };
-
virtual ~StoragePartitionImpl();
// StoragePartition interface.
@@ -57,33 +33,11 @@ class StoragePartitionImpl : public StoragePartition {
private:
friend class StoragePartitionImplMap;
- // Functor for operator <.
- struct StoragePartitionDescriptorLess {
- bool operator()(const StoragePartitionDescriptor& lhs,
- const StoragePartitionDescriptor& rhs) const {
- if (lhs.partition_domain != rhs.partition_domain)
- return lhs.partition_domain < rhs.partition_domain;
- else if (lhs.partition_name != rhs.partition_name)
- return lhs.partition_name < rhs.partition_name;
- else if (lhs.in_memory != rhs.in_memory)
- return lhs.in_memory < rhs.in_memory;
- else
- return false;
- }
- };
-
// TODO(ajwong): Break the direct dependency on |context|. We only
// need 3 pieces of info from it.
static StoragePartitionImpl* Create(
- BrowserContext* context,
- const StoragePartitionDescriptor& partition_id,
- const FilePath& profile_path);
-
- // Returns the relative path from the profile's base directory, to the
- // directory that holds all the state for storage contexts in
- // |partition_descriptor|.
- static FilePath GetStoragePartitionPath(
- const StoragePartitionDescriptor& partition_descriptor);
+ BrowserContext* context, bool in_memory,
nasko 2012/11/08 05:03:54 The second parameter should be on a new line.
awong 2012/11/09 02:51:22 Done.
+ const FilePath& partition_path);
nasko 2012/11/08 05:03:54 It will be good to put a comment that this is expe
awong 2012/11/09 02:51:22 Done.
StoragePartitionImpl(
const FilePath& partition_path,
« no previous file with comments | « no previous file | content/browser/storage_partition_impl.cc » ('j') | content/browser/storage_partition_impl_map.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698