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

Side by Side Diff: content/browser/in_process_webkit/webkit_context.cc

Issue 9467016: Get rid of WebKitContext. Only two out of six HTML5 related objects were in it and it was just a gl… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix bug Created 8 years, 10 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/in_process_webkit/webkit_context.h"
6
7 #include "base/bind.h"
8 #include "base/command_line.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"
11 #include "content/public/browser/browser_thread.h"
12
13 using content::BrowserThread;
14
15 WebKitContext::WebKitContext(
16 bool is_incognito, const FilePath& data_path,
17 quota::SpecialStoragePolicy* special_storage_policy,
18 quota::QuotaManagerProxy* quota_manager_proxy,
19 base::MessageLoopProxy* webkit_thread_loop)
20 : data_path_(is_incognito ? FilePath() : data_path),
21 is_incognito_(is_incognito),
22 ALLOW_THIS_IN_INITIALIZER_LIST(
23 dom_storage_context_(new DOMStorageContextImpl(
24 this, special_storage_policy))),
25 ALLOW_THIS_IN_INITIALIZER_LIST(
26 indexed_db_context_(new IndexedDBContextImpl(
27 this, special_storage_policy, quota_manager_proxy,
28 webkit_thread_loop))) {
29 }
30
31 WebKitContext::~WebKitContext() {
32 // If the WebKit thread was ever spun up, delete the object there. The task
33 // will just get deleted if the WebKit thread isn't created (which only
34 // happens during testing).
35 DOMStorageContextImpl* dom_storage_context = dom_storage_context_.release();
36 if (!BrowserThread::ReleaseSoon(
37 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, dom_storage_context)) {
38 // The WebKit thread wasn't created, and the task got deleted without
39 // freeing the DOMStorageContext, so delete it manually.
40 dom_storage_context->Release();
41 }
42 }
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/webkit_context.h ('k') | content/browser/renderer_host/render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698