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

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

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698