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

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

Issue 10086018: More DomStorage house cleaning (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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 "content/browser/appcache/chrome_appcache_service.h" 7 #include "content/browser/appcache/chrome_appcache_service.h"
8 #include "content/browser/dom_storage/dom_storage_context_impl.h"
8 #include "content/browser/fileapi/browser_file_system_helper.h" 9 #include "content/browser/fileapi/browser_file_system_helper.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"
11 #include "content/browser/resource_context_impl.h" 11 #include "content/browser/resource_context_impl.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "content/public/common/content_constants.h" 13 #include "content/public/common/content_constants.h"
14 #include "net/cookies/cookie_monster.h" 14 #include "net/cookies/cookie_monster.h"
15 #include "net/cookies/cookie_store.h" 15 #include "net/cookies/cookie_store.h"
16 #include "net/url_request/url_request_context.h" 16 #include "net/url_request/url_request_context.h"
17 #include "webkit/database/database_tracker.h" 17 #include "webkit/database/database_tracker.h"
18 #include "webkit/quota/quota_manager.h" 18 #include "webkit/quota/quota_manager.h"
19 19
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 BrowserContext::~BrowserContext() { 233 BrowserContext::~BrowserContext() {
234 // These message loop checks are just to avoid leaks in unittests. 234 // These message loop checks are just to avoid leaks in unittests.
235 if (GetUserData(kDatabaseTrackerKeyName) && 235 if (GetUserData(kDatabaseTrackerKeyName) &&
236 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) { 236 BrowserThread::IsMessageLoopValid(BrowserThread::FILE)) {
237 BrowserThread::PostTask( 237 BrowserThread::PostTask(
238 BrowserThread::FILE, FROM_HERE, 238 BrowserThread::FILE, FROM_HERE,
239 base::Bind(&webkit_database::DatabaseTracker::Shutdown, 239 base::Bind(&webkit_database::DatabaseTracker::Shutdown,
240 GetDatabaseTracker(this))); 240 GetDatabaseTracker(this)));
241 } 241 }
242 242
243 #ifdef ENABLE_NEW_DOM_STORAGE_BACKEND
244 if (GetUserData(kDOMStorageContextKeyName)) 243 if (GetUserData(kDOMStorageContextKeyName))
245 GetDOMStorageContextImpl(this)->Shutdown(); 244 GetDOMStorageContextImpl(this)->Shutdown();
246 #else
247 if (GetUserData(kDOMStorageContextKeyName) &&
248 BrowserThread::IsMessageLoopValid(BrowserThread::WEBKIT_DEPRECATED)) {
249 DOMStorageContextImpl* dom_storage_context =
250 (static_cast<UserDataAdapter<DOMStorageContextImpl>*>(
251 GetUserData(kDOMStorageContextKeyName)))->release();
252 BrowserThread::ReleaseSoon(
253 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, dom_storage_context);
254 }
255 #endif
256 } 245 }
257 246
258 } // namespace content 247 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698