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

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

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