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

Side by Side Diff: content/browser/storage_partition_impl.cc

Issue 10967030: Shorten the path length to get under MAX_PATH on windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « no previous file | no next file » | 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 #include "content/browser/storage_partition_impl.h" 5 #include "content/browser/storage_partition_impl.h"
6 6
7 #include "content/browser/fileapi/browser_file_system_helper.h" 7 #include "content/browser/fileapi/browser_file_system_helper.h"
8 #include "content/public/browser/browser_context.h" 8 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
11 #include "webkit/database/database_tracker.h" 11 #include "webkit/database/database_tracker.h"
12 #include "webkit/quota/quota_manager.h" 12 #include "webkit/quota/quota_manager.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 namespace { 16 namespace {
17 17
18 // These constants are used to create the directory structure under the profile 18 // These constants are used to create the directory structure under the profile
19 // where renderers with a non-default storage partition keep their persistent 19 // where renderers with a non-default storage partition keep their persistent
20 // state. This will contain a set of directories that partially mirror the 20 // state. This will contain a set of directories that partially mirror the
21 // directory structure of BrowserContext::GetPath(). 21 // directory structure of BrowserContext::GetPath().
22 // 22 //
23 // The kStoragePartitionDirname is contains an extensions directory which is 23 // The kStoragePartitionDirname is contains an extensions directory which is
24 // further partitioned by extension id, followed by another level of directories 24 // further partitioned by extension id, followed by another level of directories
25 // for the "default" extension storage partition and one directory for each 25 // for the "default" extension storage partition and one directory for each
26 // persistent partition used by an extension's browser tags. Example: 26 // persistent partition used by an extension's browser tags. Example:
27 // 27 //
28 // {kStoragePartitionDirname}/extensions/ABCDEF/default 28 // Storage/ext/ABCDEF/def
29 // {kStoragePartitionDirname}/extensions/ABCDEF/{hash(guest partition)} 29 // Storage/ext/ABCDEF/{hash(guest partition)}
30 // 30 //
31 // The code in GetPartitionPath() constructs these path names. 31 // The code in GetPartitionPath() constructs these path names.
32 const FilePath::CharType kStoragePartitionDirname[] = 32 const FilePath::CharType kStoragePartitionDirname[] =
33 FILE_PATH_LITERAL("Storage Partitions"); 33 FILE_PATH_LITERAL("Storage");
34 const FilePath::CharType kExtensionsDirname[] = 34 const FilePath::CharType kExtensionsDirname[] =
35 FILE_PATH_LITERAL("extensions"); 35 FILE_PATH_LITERAL("ext");
36 const FilePath::CharType kDefaultPartitionDirname[] = 36 const FilePath::CharType kDefaultPartitionDirname[] =
37 FILE_PATH_LITERAL("default"); 37 FILE_PATH_LITERAL("def");
38 38
39 } // namespace 39 } // namespace
40 40
41 // static 41 // static
42 FilePath StoragePartition::GetPartitionPath(const std::string& partition_id) { 42 FilePath StoragePartition::GetPartitionPath(const std::string& partition_id) {
43 if (partition_id.empty()) { 43 if (partition_id.empty()) {
44 // The default profile just sits inside the top-level profile directory. 44 // The default profile just sits inside the top-level profile directory.
45 return FilePath(); 45 return FilePath();
46 } 46 }
47 47
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 net::URLRequestContextGetter* url_request_context) { 185 net::URLRequestContextGetter* url_request_context) {
186 url_request_context_ = url_request_context; 186 url_request_context_ = url_request_context;
187 } 187 }
188 188
189 void StoragePartitionImpl::SetMediaURLRequestContext( 189 void StoragePartitionImpl::SetMediaURLRequestContext(
190 net::URLRequestContextGetter* media_url_request_context) { 190 net::URLRequestContextGetter* media_url_request_context) {
191 media_url_request_context_ = media_url_request_context; 191 media_url_request_context_ = media_url_request_context;
192 } 192 }
193 193
194 } // namespace content 194 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698