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

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

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Android's BrowserContext. 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
(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_tables.h"
10
11 // This structure combines the on-disk path and a boolean whether the partition
Charlie Reis 2012/10/30 17:47:48 nit: combines a StoragePartition's on-disk path an
nasko 2012/10/30 19:55:25 Done.
Charlie Reis 2012/10/30 20:13:07 Can you also add the "combines a StoragePartition'
nasko 2012/10/30 20:27:43 Done.
12 // should be persisted on disk. It's purpose is to serve as a unique key to
Charlie Reis 2012/10/30 17:47:48 nit: Its
nasko 2012/10/30 19:55:25 Done.
13 // look up RequestContext objects in the ProfileIOData derived classes.
14 struct StoragePartitionDescriptor {
15 StoragePartitionDescriptor(const FilePath& partition_path,
16 const bool in_memory_only)
17 : path(partition_path),
18 in_memory(in_memory_only) {}
19
20 const FilePath path;
21 const bool in_memory;
22 };
23
24 // Functor for operator <.
25 struct StoragePartitionDescriptorLess {
26 bool operator()(const StoragePartitionDescriptor& lhs,
27 const StoragePartitionDescriptor& rhs) const {
28 if (lhs.path != rhs.path)
29 return lhs.path < rhs.path;
30 else if (lhs.in_memory != rhs.in_memory)
31 return lhs.in_memory < rhs.in_memory;
32 else
33 return false;
34 }
35 };
36
37 #endif // CHROME_BROWSER_PROFILES_STORAGE_PARTITION_DESCRIPTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698