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

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

Issue 1170623003: Revert "content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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_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/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/location.h"
13 #include "base/single_thread_task_runner.h"
14 #include "base/stl_util.h" 12 #include "base/stl_util.h"
15 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
17 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
18 #include "base/thread_task_runner_handle.h"
19 #include "base/threading/sequenced_worker_pool.h" 16 #include "base/threading/sequenced_worker_pool.h"
20 #include "content/browser/appcache/appcache_interceptor.h" 17 #include "content/browser/appcache/appcache_interceptor.h"
21 #include "content/browser/appcache/chrome_appcache_service.h" 18 #include "content/browser/appcache/chrome_appcache_service.h"
22 #include "content/browser/fileapi/browser_file_system_helper.h" 19 #include "content/browser/fileapi/browser_file_system_helper.h"
23 #include "content/browser/fileapi/chrome_blob_storage_context.h" 20 #include "content/browser/fileapi/chrome_blob_storage_context.h"
24 #include "content/browser/loader/resource_request_info_impl.h" 21 #include "content/browser/loader/resource_request_info_impl.h"
25 #include "content/browser/resource_context_impl.h" 22 #include "content/browser/resource_context_impl.h"
26 #include "content/browser/service_worker/service_worker_request_handler.h" 23 #include "content/browser/service_worker/service_worker_request_handler.h"
27 #include "content/browser/storage_partition_impl.h" 24 #include "content/browser/storage_partition_impl.h"
28 #include "content/browser/streams/stream.h" 25 #include "content/browser/streams/stream.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 // known to still be in use. This is to delete any previously created 514 // known to still be in use. This is to delete any previously created
518 // StoragePartition state that just happens to not have been used during this 515 // StoragePartition state that just happens to not have been used during this
519 // run of the browser. 516 // run of the browser.
520 base::FilePath domain_root = browser_context_->GetPath().Append( 517 base::FilePath domain_root = browser_context_->GetPath().Append(
521 GetStoragePartitionDomainPath(partition_domain)); 518 GetStoragePartitionDomainPath(partition_domain));
522 519
523 BrowserThread::PostBlockingPoolTask( 520 BrowserThread::PostBlockingPoolTask(
524 FROM_HERE, 521 FROM_HERE,
525 base::Bind(&BlockingObliteratePath, browser_context_->GetPath(), 522 base::Bind(&BlockingObliteratePath, browser_context_->GetPath(),
526 domain_root, paths_to_keep, 523 domain_root, paths_to_keep,
527 base::ThreadTaskRunnerHandle::Get(), on_gc_required)); 524 base::MessageLoopProxy::current(), on_gc_required));
528 } 525 }
529 526
530 void StoragePartitionImplMap::GarbageCollect( 527 void StoragePartitionImplMap::GarbageCollect(
531 scoped_ptr<base::hash_set<base::FilePath> > active_paths, 528 scoped_ptr<base::hash_set<base::FilePath> > active_paths,
532 const base::Closure& done) { 529 const base::Closure& done) {
533 // Include all paths for current StoragePartitions in the active_paths since 530 // Include all paths for current StoragePartitions in the active_paths since
534 // they cannot be deleted safely. 531 // they cannot be deleted safely.
535 for (PartitionMap::const_iterator it = partitions_.begin(); 532 for (PartitionMap::const_iterator it = partitions_.begin();
536 it != partitions_.end(); 533 it != partitions_.end();
537 ++it) { 534 ++it) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 594
598 // We do not call InitializeURLRequestContext() for media contexts because, 595 // We do not call InitializeURLRequestContext() for media contexts because,
599 // other than the HTTP cache, the media contexts share the same backing 596 // other than the HTTP cache, the media contexts share the same backing
600 // objects as their associated "normal" request context. Thus, the previous 597 // objects as their associated "normal" request context. Thus, the previous
601 // call serves to initialize the media request context for this storage 598 // call serves to initialize the media request context for this storage
602 // partition as well. 599 // partition as well.
603 } 600 }
604 } 601 }
605 602
606 } // namespace content 603 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl.cc ('k') | content/browser/storage_partition_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698