Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_ | |
| 6 #define CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_ | |
| 7 | |
| 8 #include "base/file_path.h" | |
| 9 #include "base/hash.h" | |
|
awong
2012/10/29 23:37:40
you don't need these hash includes anymore.
nasko
2012/10/30 00:32:59
Done.
| |
| 10 #include "base/hash_tables.h" | |
| 11 | |
| 12 // This structure combines the on-disk path and a boolean whether the partition | |
| 13 // should be persisted on disk. It's purpose is to serve as a unique key to | |
| 14 // look up RequestContext objects in the ProfileIOData derived classes. | |
| 15 struct StoragePartitionDescriptor { | |
| 16 StoragePartitionDescriptor(const FilePath& partition_path, | |
| 17 const bool in_memory_only) | |
|
awong
2012/10/29 23:37:40
spacing
nasko
2012/10/30 00:32:59
Done.
| |
| 18 : path(partition_path), | |
| 19 in_memory(in_memory_only) {} | |
| 20 | |
| 21 const FilePath path; | |
| 22 const bool in_memory; | |
| 23 }; | |
| 24 | |
| 25 // Functor for operator <. | |
| 26 struct StoragePartitionDescriptorLess { | |
| 27 bool operator()(const StoragePartitionDescriptor& lhs, | |
| 28 const StoragePartitionDescriptor& rhs) const { | |
| 29 if (lhs.path != rhs.path) | |
| 30 return lhs.path < rhs.path; | |
| 31 else if (lhs.in_memory != rhs.in_memory) | |
| 32 return lhs.in_memory < rhs.in_memory; | |
| 33 else | |
| 34 return false; | |
| 35 } | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_ | |
| OLD | NEW |