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

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

Issue 1496853002: MD Downloads: fix incognito markers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@thread-bundle
Patch Set: remove DCHECK Created 5 years 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 | « chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc ('k') | no next file » | 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 #if !defined(OS_IOS) 7 #if !defined(OS_IOS)
8 #include "content/browser/download/download_manager_impl.h" 8 #include "content/browser/download/download_manager_impl.h"
9 #include "content/browser/fileapi/chrome_blob_storage_context.h" 9 #include "content/browser/fileapi/chrome_blob_storage_context.h"
10 #include "content/browser/indexed_db/indexed_db_context_impl.h" 10 #include "content/browser/indexed_db/indexed_db_context_impl.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 scoped_ptr<base::hash_set<base::FilePath> > active_paths, 115 scoped_ptr<base::hash_set<base::FilePath> > active_paths,
116 const base::Closure& done) { 116 const base::Closure& done) {
117 GetStoragePartitionMap(browser_context)->GarbageCollect( 117 GetStoragePartitionMap(browser_context)->GarbageCollect(
118 active_paths.Pass(), done); 118 active_paths.Pass(), done);
119 } 119 }
120 120
121 DownloadManager* BrowserContext::GetDownloadManager( 121 DownloadManager* BrowserContext::GetDownloadManager(
122 BrowserContext* context) { 122 BrowserContext* context) {
123 DCHECK_CURRENTLY_ON(BrowserThread::UI); 123 DCHECK_CURRENTLY_ON(BrowserThread::UI);
124 if (!context->GetUserData(kDownloadManagerKeyName)) { 124 if (!context->GetUserData(kDownloadManagerKeyName)) {
125 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get();
126 DCHECK(rdh);
127 DownloadManager* download_manager = 125 DownloadManager* download_manager =
128 new DownloadManagerImpl( 126 new DownloadManagerImpl(
129 GetContentClient()->browser()->GetNetLog(), context); 127 GetContentClient()->browser()->GetNetLog(), context);
130 128
131 SetDownloadManager(context, download_manager); 129 SetDownloadManager(context, download_manager);
132 download_manager->SetDelegate(context->GetDownloadManagerDelegate()); 130 download_manager->SetDelegate(context->GetDownloadManagerDelegate());
133 } 131 }
134 132
135 return static_cast<DownloadManager*>( 133 return static_cast<DownloadManager*>(
136 context->GetUserData(kDownloadManagerKeyName)); 134 context->GetUserData(kDownloadManagerKeyName));
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 #endif // !OS_IOS 319 #endif // !OS_IOS
322 320
323 BrowserContext::~BrowserContext() { 321 BrowserContext::~BrowserContext() {
324 #if !defined(OS_IOS) 322 #if !defined(OS_IOS)
325 if (GetUserData(kDownloadManagerKeyName)) 323 if (GetUserData(kDownloadManagerKeyName))
326 GetDownloadManager(this)->Shutdown(); 324 GetDownloadManager(this)->Shutdown();
327 #endif 325 #endif
328 } 326 }
329 327
330 } // namespace content 328 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/md_downloads/downloads_list_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698