| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 GetDefaultStoragePartition(browser_context)->GetDatabaseTracker()-> | 294 GetDefaultStoragePartition(browser_context)->GetDatabaseTracker()-> |
| 295 SetForceKeepSessionState(); | 295 SetForceKeepSessionState(); |
| 296 StoragePartition* storage_partition = | 296 StoragePartition* storage_partition = |
| 297 BrowserContext::GetDefaultStoragePartition(browser_context); | 297 BrowserContext::GetDefaultStoragePartition(browser_context); |
| 298 | 298 |
| 299 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { | 299 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { |
| 300 BrowserThread::PostTask( | 300 BrowserThread::PostTask( |
| 301 BrowserThread::IO, FROM_HERE, | 301 BrowserThread::IO, FROM_HERE, |
| 302 base::Bind( | 302 base::Bind( |
| 303 &SaveSessionStateOnIOThread, | 303 &SaveSessionStateOnIOThread, |
| 304 make_scoped_refptr(browser_context->GetRequestContext()), | 304 make_scoped_refptr(BrowserContext::GetDefaultStoragePartition( |
| 305 browser_context)->GetURLRequestContext()), |
| 305 static_cast<AppCacheServiceImpl*>( | 306 static_cast<AppCacheServiceImpl*>( |
| 306 storage_partition->GetAppCacheService()))); | 307 storage_partition->GetAppCacheService()))); |
| 307 } | 308 } |
| 308 | 309 |
| 309 DOMStorageContextWrapper* dom_storage_context_proxy = | 310 DOMStorageContextWrapper* dom_storage_context_proxy = |
| 310 static_cast<DOMStorageContextWrapper*>( | 311 static_cast<DOMStorageContextWrapper*>( |
| 311 storage_partition->GetDOMStorageContext()); | 312 storage_partition->GetDOMStorageContext()); |
| 312 dom_storage_context_proxy->SetForceKeepSessionState(); | 313 dom_storage_context_proxy->SetForceKeepSessionState(); |
| 313 | 314 |
| 314 IndexedDBContextImpl* indexed_db_context_impl = | 315 IndexedDBContextImpl* indexed_db_context_impl = |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 BrowserContext::~BrowserContext() { | 364 BrowserContext::~BrowserContext() { |
| 364 CHECK(GetUserData(kMojoWasInitialized)) | 365 CHECK(GetUserData(kMojoWasInitialized)) |
| 365 << "Attempting to destroy a BrowserContext that never called " | 366 << "Attempting to destroy a BrowserContext that never called " |
| 366 << "Initialize()"; | 367 << "Initialize()"; |
| 367 | 368 |
| 368 if (GetUserData(kDownloadManagerKeyName)) | 369 if (GetUserData(kDownloadManagerKeyName)) |
| 369 GetDownloadManager(this)->Shutdown(); | 370 GetDownloadManager(this)->Shutdown(); |
| 370 } | 371 } |
| 371 | 372 |
| 372 } // namespace content | 373 } // namespace content |
| OLD | NEW |