| 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/public/browser/browser_context.h" | 5 #include "content/public/browser/browser_context.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 void BrowserContext::AsyncObliterateStoragePartition( | 116 void BrowserContext::AsyncObliterateStoragePartition( |
| 117 BrowserContext* browser_context, | 117 BrowserContext* browser_context, |
| 118 const GURL& site, | 118 const GURL& site, |
| 119 const base::Closure& on_gc_required) { | 119 const base::Closure& on_gc_required) { |
| 120 GetStoragePartitionMap(browser_context)->AsyncObliterate(site, | 120 GetStoragePartitionMap(browser_context)->AsyncObliterate(site, |
| 121 on_gc_required); | 121 on_gc_required); |
| 122 } | 122 } |
| 123 | 123 |
| 124 // static | 124 // static |
| 125 void BrowserContext::GarbageCollectStoragePartitions( | 125 void BrowserContext::GarbageCollectStoragePartitions( |
| 126 BrowserContext* browser_context, | 126 BrowserContext* browser_context, |
| 127 scoped_ptr<base::hash_set<base::FilePath> > active_paths, | 127 std::unique_ptr<base::hash_set<base::FilePath>> active_paths, |
| 128 const base::Closure& done) { | 128 const base::Closure& done) { |
| 129 GetStoragePartitionMap(browser_context) | 129 GetStoragePartitionMap(browser_context) |
| 130 ->GarbageCollect(std::move(active_paths), done); | 130 ->GarbageCollect(std::move(active_paths), done); |
| 131 } | 131 } |
| 132 | 132 |
| 133 DownloadManager* BrowserContext::GetDownloadManager( | 133 DownloadManager* BrowserContext::GetDownloadManager( |
| 134 BrowserContext* context) { | 134 BrowserContext* context) { |
| 135 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 135 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 136 if (!context->GetUserData(kDownloadManagerKeyName)) { | 136 if (!context->GetUserData(kDownloadManagerKeyName)) { |
| 137 DownloadManager* download_manager = | 137 DownloadManager* download_manager = |
| 138 new DownloadManagerImpl( | 138 new DownloadManagerImpl( |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 BrowserContext::~BrowserContext() { | 363 BrowserContext::~BrowserContext() { |
| 364 CHECK(GetUserData(kMojoWasInitialized)) | 364 CHECK(GetUserData(kMojoWasInitialized)) |
| 365 << "Attempting to destroy a BrowserContext that never called " | 365 << "Attempting to destroy a BrowserContext that never called " |
| 366 << "Initialize()"; | 366 << "Initialize()"; |
| 367 | 367 |
| 368 if (GetUserData(kDownloadManagerKeyName)) | 368 if (GetUserData(kDownloadManagerKeyName)) |
| 369 GetDownloadManager(this)->Shutdown(); | 369 GetDownloadManager(this)->Shutdown(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 } // namespace content | 372 } // namespace content |
| OLD | NEW |