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

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

Issue 8929007: Restore sessionStorage when chrome restarts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix: cloning storage areas. Created 8 years, 11 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void WebKitContext::SaveSessionState() { 85 void WebKitContext::SaveSessionState() {
86 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)) { 86 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)) {
87 BrowserThread::PostTask( 87 BrowserThread::PostTask(
88 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, 88 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE,
89 base::Bind(&WebKitContext::SaveSessionState, this)); 89 base::Bind(&WebKitContext::SaveSessionState, this));
90 return; 90 return;
91 } 91 }
92 dom_storage_context_->SaveSessionState(); 92 dom_storage_context_->SaveSessionState();
93 indexed_db_context_->SaveSessionState(); 93 indexed_db_context_->SaveSessionState();
94 } 94 }
95
96 void WebKitContext::DeleteUnneededSessionStorages(
97 const std::set<std::string>& needed_session_storages) {
98 if (!BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)) {
99 BrowserThread::PostTask(
100 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE,
101 base::Bind(&WebKitContext::DeleteUnneededSessionStorages, this,
102 needed_session_storages));
103 return;
104 }
105
106 dom_storage_context_->DeleteUnneededSessionStorages(needed_session_storages);
107 }
OLDNEW
« no previous file with comments | « content/browser/in_process_webkit/webkit_context.h ('k') | content/public/browser/notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698