| 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 "content/browser/appcache/chrome_appcache_service.h" | 7 #include "content/browser/appcache/chrome_appcache_service.h" |
| 8 #include "content/browser/file_system/browser_file_system_helper.h" | 8 #include "content/browser/file_system/browser_file_system_helper.h" |
| 9 #include "content/browser/in_process_webkit/dom_storage_context_impl.h" | 9 #include "content/browser/in_process_webkit/dom_storage_context_impl.h" |
| 10 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" | 10 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // Each consumer is responsible for registering its QuotaClient during | 58 // Each consumer is responsible for registering its QuotaClient during |
| 59 // its construction. | 59 // its construction. |
| 60 scoped_refptr<FileSystemContext> filesystem_context = CreateFileSystemContext( | 60 scoped_refptr<FileSystemContext> filesystem_context = CreateFileSystemContext( |
| 61 context->GetPath(), context->IsOffTheRecord(), | 61 context->GetPath(), context->IsOffTheRecord(), |
| 62 context->GetSpecialStoragePolicy(), quota_manager->proxy()); | 62 context->GetSpecialStoragePolicy(), quota_manager->proxy()); |
| 63 context->SetUserData( | 63 context->SetUserData( |
| 64 kFileSystemContextKeyName, | 64 kFileSystemContextKeyName, |
| 65 new UserDataAdapter<FileSystemContext>(filesystem_context)); | 65 new UserDataAdapter<FileSystemContext>(filesystem_context)); |
| 66 | 66 |
| 67 scoped_refptr<DatabaseTracker> db_tracker = new DatabaseTracker( | 67 scoped_refptr<DatabaseTracker> db_tracker = new DatabaseTracker( |
| 68 context->GetPath(), context->IsOffTheRecord(), false, | 68 context->GetPath(), context->IsOffTheRecord(), |
| 69 context->GetSpecialStoragePolicy(), quota_manager->proxy(), | 69 context->GetSpecialStoragePolicy(), quota_manager->proxy(), |
| 70 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); | 70 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
| 71 context->SetUserData(kDatabaseTrackerKeyName, | 71 context->SetUserData(kDatabaseTrackerKeyName, |
| 72 new UserDataAdapter<DatabaseTracker>(db_tracker)); | 72 new UserDataAdapter<DatabaseTracker>(db_tracker)); |
| 73 | 73 |
| 74 FilePath path = context->IsOffTheRecord() ? FilePath() : context->GetPath(); | 74 FilePath path = context->IsOffTheRecord() ? FilePath() : context->GetPath(); |
| 75 scoped_refptr<DOMStorageContext> dom_storage_context = | 75 scoped_refptr<DOMStorageContext> dom_storage_context = |
| 76 new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy()); | 76 new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy()); |
| 77 context->SetUserData( | 77 context->SetUserData( |
| 78 kDOMStorageContextKeyName, | 78 kDOMStorageContextKeyName, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 BrowserThread::IsMessageLoopValid(BrowserThread::WEBKIT_DEPRECATED)) { | 246 BrowserThread::IsMessageLoopValid(BrowserThread::WEBKIT_DEPRECATED)) { |
| 247 DOMStorageContext* dom_storage_context = | 247 DOMStorageContext* dom_storage_context = |
| 248 (static_cast<UserDataAdapter<DOMStorageContext>*>( | 248 (static_cast<UserDataAdapter<DOMStorageContext>*>( |
| 249 GetUserData(kDOMStorageContextKeyName)))->release(); | 249 GetUserData(kDOMStorageContextKeyName)))->release(); |
| 250 BrowserThread::ReleaseSoon( | 250 BrowserThread::ReleaseSoon( |
| 251 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, dom_storage_context); | 251 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, dom_storage_context); |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace content | 255 } // namespace content |
| OLD | NEW |