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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 &trash_directory)) { | 330 &trash_directory)) { |
331 // Unable to continue without creating the trash directory so give up. | 331 // Unable to continue without creating the trash directory so give up. |
332 return; | 332 return; |
333 } | 333 } |
334 for (base::FilePath path = enumerator.Next(); !path.empty(); | 334 for (base::FilePath path = enumerator.Next(); !path.empty(); |
335 path = enumerator.Next()) { | 335 path = enumerator.Next()) { |
336 if (active_paths->find(path) == active_paths->end() && | 336 if (active_paths->find(path) == active_paths->end() && |
337 path != trash_directory) { | 337 path != trash_directory) { |
338 // Since |trash_directory| is unique for each run of this function there | 338 // Since |trash_directory| is unique for each run of this function there |
339 // can be no colllisions on the move. | 339 // can be no colllisions on the move. |
340 file_util::Move(path, trash_directory.Append(path.BaseName())); | 340 base::Move(path, trash_directory.Append(path.BaseName())); |
341 } | 341 } |
342 } | 342 } |
343 | 343 |
344 file_access_runner->PostTask( | 344 file_access_runner->PostTask( |
345 FROM_HERE, | 345 FROM_HERE, |
346 base::Bind(base::IgnoreResult(&base::Delete), trash_directory, true)); | 346 base::Bind(base::IgnoreResult(&base::Delete), trash_directory, true)); |
347 } | 347 } |
348 | 348 |
349 } // namespace | 349 } // namespace |
350 | 350 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 | 579 |
580 // We do not call InitializeURLRequestContext() for media contexts because, | 580 // We do not call InitializeURLRequestContext() for media contexts because, |
581 // other than the HTTP cache, the media contexts share the same backing | 581 // other than the HTTP cache, the media contexts share the same backing |
582 // objects as their associated "normal" request context. Thus, the previous | 582 // objects as their associated "normal" request context. Thus, the previous |
583 // call serves to initialize the media request context for this storage | 583 // call serves to initialize the media request context for this storage |
584 // partition as well. | 584 // partition as well. |
585 } | 585 } |
586 } | 586 } |
587 | 587 |
588 } // namespace content | 588 } // namespace content |
OLD | NEW |