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

Side by Side Diff: chrome/browser/profiles/storage_partition_descriptor.h

Issue 16667019: Rename base/hash_tables to base/containers/hash_tables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/browser/resources_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_ 5 #ifndef CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_
6 #define CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_ 6 #define CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_
7 7
8 #include "base/containers/hash_tables.h"
8 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
9 #include "base/hash_tables.h"
10 10
11 // This structure combines a StoragePartition's on-disk path and a boolean for 11 // This structure combines a StoragePartition's on-disk path and a boolean for
12 // whether the partition should be persisted on disk. Its purpose is to serve as 12 // whether the partition should be persisted on disk. Its purpose is to serve as
13 // a unique key to look up RequestContext objects in the ProfileIOData derived 13 // a unique key to look up RequestContext objects in the ProfileIOData derived
14 // classes. 14 // classes.
15 struct StoragePartitionDescriptor { 15 struct StoragePartitionDescriptor {
16 StoragePartitionDescriptor(const base::FilePath& partition_path, 16 StoragePartitionDescriptor(const base::FilePath& partition_path,
17 const bool in_memory_only) 17 const bool in_memory_only)
18 : path(partition_path), 18 : path(partition_path),
19 in_memory(in_memory_only) {} 19 in_memory(in_memory_only) {}
20 20
21 const base::FilePath path; 21 const base::FilePath path;
22 const bool in_memory; 22 const bool in_memory;
23 }; 23 };
24 24
25 // Functor for operator <. 25 // Functor for operator <.
26 struct StoragePartitionDescriptorLess { 26 struct StoragePartitionDescriptorLess {
27 bool operator()(const StoragePartitionDescriptor& lhs, 27 bool operator()(const StoragePartitionDescriptor& lhs,
28 const StoragePartitionDescriptor& rhs) const { 28 const StoragePartitionDescriptor& rhs) const {
29 if (lhs.path != rhs.path) 29 if (lhs.path != rhs.path)
30 return lhs.path < rhs.path; 30 return lhs.path < rhs.path;
31 else if (lhs.in_memory != rhs.in_memory) 31 else if (lhs.in_memory != rhs.in_memory)
32 return lhs.in_memory < rhs.in_memory; 32 return lhs.in_memory < rhs.in_memory;
33 else 33 else
34 return false; 34 return false;
35 } 35 }
36 }; 36 };
37 37
38 #endif // CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_ 38 #endif // CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.h ('k') | chrome/browser/resources_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698