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

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

Issue 7480041: Adding session-only localStorage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Un-blocking the WebKit thread, delayed answering to the DOMStorageHostMsg_StorageAreaId. Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 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 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/browser/in_process_webkit/webkit_context.h" 5 #include "content/browser/in_process_webkit/webkit_context.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/browser_thread.h" 8 #include "content/browser/browser_thread.h"
9 9
10 WebKitContext::WebKitContext( 10 WebKitContext::WebKitContext(
11 bool is_incognito, const FilePath& data_path, 11 bool is_incognito, const FilePath& data_path,
12 quota::SpecialStoragePolicy* special_storage_policy, 12 quota::SpecialStoragePolicy* special_storage_policy,
13 const content::ResourceContext& resource_context,
13 bool clear_local_state_on_exit, 14 bool clear_local_state_on_exit,
14 quota::QuotaManagerProxy* quota_manager_proxy, 15 quota::QuotaManagerProxy* quota_manager_proxy,
15 base::MessageLoopProxy* webkit_thread_loop) 16 base::MessageLoopProxy* webkit_thread_loop)
16 : data_path_(is_incognito ? FilePath() : data_path), 17 : data_path_(is_incognito ? FilePath() : data_path),
17 is_incognito_(is_incognito), 18 is_incognito_(is_incognito),
18 clear_local_state_on_exit_(clear_local_state_on_exit), 19 clear_local_state_on_exit_(clear_local_state_on_exit),
19 ALLOW_THIS_IN_INITIALIZER_LIST( 20 ALLOW_THIS_IN_INITIALIZER_LIST(
20 dom_storage_context_(new DOMStorageContext( 21 dom_storage_context_(new DOMStorageContext(
21 this, special_storage_policy))), 22 this, special_storage_policy, resource_context))),
22 ALLOW_THIS_IN_INITIALIZER_LIST( 23 ALLOW_THIS_IN_INITIALIZER_LIST(
23 indexed_db_context_(new IndexedDBContext( 24 indexed_db_context_(new IndexedDBContext(
24 this, special_storage_policy, quota_manager_proxy, 25 this, special_storage_policy, quota_manager_proxy,
25 webkit_thread_loop))) { 26 webkit_thread_loop))) {
26 } 27 }
27 28
28 WebKitContext::~WebKitContext() { 29 WebKitContext::~WebKitContext() {
29 // If the WebKit thread was ever spun up, delete the object there. The task 30 // If the WebKit thread was ever spun up, delete the object there. The task
30 // will just get deleted if the WebKit thread isn't created (which only 31 // will just get deleted if the WebKit thread isn't created (which only
31 // happens during testing). 32 // happens during testing).
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 BrowserThread::PostTask( 74 BrowserThread::PostTask(
74 BrowserThread::WEBKIT, FROM_HERE, 75 BrowserThread::WEBKIT, FROM_HERE,
75 NewRunnableMethod(this, &WebKitContext::DeleteSessionStorageNamespace, 76 NewRunnableMethod(this, &WebKitContext::DeleteSessionStorageNamespace,
76 session_storage_namespace_id)); 77 session_storage_namespace_id));
77 return; 78 return;
78 } 79 }
79 80
80 dom_storage_context_->DeleteSessionStorageNamespace( 81 dom_storage_context_->DeleteSessionStorageNamespace(
81 session_storage_namespace_id); 82 session_storage_namespace_id);
82 } 83 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698