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

Side by Side Diff: webkit/dom_storage/dom_storage_session.cc

Issue 10969012: Fix: Prerendering was confusing SessionService to not save sessionStorage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 8 years, 2 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
« no previous file with comments | « webkit/dom_storage/dom_storage_session.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/dom_storage/dom_storage_session.h" 5 #include "webkit/dom_storage/dom_storage_session.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/tracked_objects.h" 10 #include "base/tracked_objects.h"
(...skipping 22 matching lines...) Expand all
33 context->task_runner()->PostTask( 33 context->task_runner()->PostTask(
34 FROM_HERE, 34 FROM_HERE,
35 base::Bind(&DomStorageContext::CreateSessionNamespace, 35 base::Bind(&DomStorageContext::CreateSessionNamespace,
36 context_, namespace_id_, persistent_namespace_id_)); 36 context_, namespace_id_, persistent_namespace_id_));
37 } 37 }
38 38
39 void DomStorageSession::SetShouldPersist(bool should_persist) { 39 void DomStorageSession::SetShouldPersist(bool should_persist) {
40 should_persist_ = should_persist; 40 should_persist_ = should_persist;
41 } 41 }
42 42
43 bool DomStorageSession::should_persist() const {
44 return should_persist_;
45 }
46
43 bool DomStorageSession::IsFromContext(DomStorageContext* context) { 47 bool DomStorageSession::IsFromContext(DomStorageContext* context) {
44 return context_.get() == context; 48 return context_.get() == context;
45 } 49 }
46 50
47 DomStorageSession* DomStorageSession::Clone() { 51 DomStorageSession* DomStorageSession::Clone() {
48 return CloneFrom(context_, namespace_id_); 52 return CloneFrom(context_, namespace_id_);
49 } 53 }
50 54
51 // static 55 // static
52 DomStorageSession* DomStorageSession::CloneFrom(DomStorageContext* context, 56 DomStorageSession* DomStorageSession::CloneFrom(DomStorageContext* context,
(...skipping 18 matching lines...) Expand all
71 } 75 }
72 76
73 DomStorageSession::~DomStorageSession() { 77 DomStorageSession::~DomStorageSession() {
74 context_->task_runner()->PostTask( 78 context_->task_runner()->PostTask(
75 FROM_HERE, 79 FROM_HERE,
76 base::Bind(&DomStorageContext::DeleteSessionNamespace, 80 base::Bind(&DomStorageContext::DeleteSessionNamespace,
77 context_, namespace_id_, should_persist_)); 81 context_, namespace_id_, should_persist_));
78 } 82 }
79 83
80 } // namespace dom_storage 84 } // namespace dom_storage
OLDNEW
« no previous file with comments | « webkit/dom_storage/dom_storage_session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698