OLD | NEW |
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_map.h" | 5 #include "content/browser/storage_partition_impl_map.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 const int kAllFileTypes = base::FileEnumerator::FILES | | 152 const int kAllFileTypes = base::FileEnumerator::FILES | |
153 base::FileEnumerator::DIRECTORIES | | 153 base::FileEnumerator::DIRECTORIES | |
154 base::FileEnumerator::SHOW_SYM_LINKS; | 154 base::FileEnumerator::SHOW_SYM_LINKS; |
155 #else | 155 #else |
156 const int kAllFileTypes = base::FileEnumerator::FILES | | 156 const int kAllFileTypes = base::FileEnumerator::FILES | |
157 base::FileEnumerator::DIRECTORIES; | 157 base::FileEnumerator::DIRECTORIES; |
158 #endif | 158 #endif |
159 | 159 |
160 base::FilePath GetStoragePartitionDomainPath( | 160 base::FilePath GetStoragePartitionDomainPath( |
161 const std::string& partition_domain) { | 161 const std::string& partition_domain) { |
162 CHECK(IsStringUTF8(partition_domain)); | 162 CHECK(base::IsStringUTF8(partition_domain)); |
163 | 163 |
164 return base::FilePath(kStoragePartitionDirname).Append(kExtensionsDirname) | 164 return base::FilePath(kStoragePartitionDirname).Append(kExtensionsDirname) |
165 .Append(base::FilePath::FromUTF8Unsafe(partition_domain)); | 165 .Append(base::FilePath::FromUTF8Unsafe(partition_domain)); |
166 } | 166 } |
167 | 167 |
168 // Helper function for doing a depth-first deletion of the data on disk. | 168 // Helper function for doing a depth-first deletion of the data on disk. |
169 // Examines paths directly in |current_dir| (no recursion) and tries to | 169 // Examines paths directly in |current_dir| (no recursion) and tries to |
170 // delete from disk anything that is in, or isn't a parent of something in | 170 // delete from disk anything that is in, or isn't a parent of something in |
171 // |paths_to_keep|. Paths that need further expansion are added to | 171 // |paths_to_keep|. Paths that need further expansion are added to |
172 // |paths_to_consider|. | 172 // |paths_to_consider|. |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 // We do not call InitializeURLRequestContext() for media contexts because, | 562 // We do not call InitializeURLRequestContext() for media contexts because, |
563 // other than the HTTP cache, the media contexts share the same backing | 563 // other than the HTTP cache, the media contexts share the same backing |
564 // objects as their associated "normal" request context. Thus, the previous | 564 // objects as their associated "normal" request context. Thus, the previous |
565 // call serves to initialize the media request context for this storage | 565 // call serves to initialize the media request context for this storage |
566 // partition as well. | 566 // partition as well. |
567 } | 567 } |
568 } | 568 } |
569 | 569 |
570 } // namespace content | 570 } // namespace content |
OLD | NEW |