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

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

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 "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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 bool DomStorageSession::should_persist() const { 43 bool DomStorageSession::should_persist() const {
44 return should_persist_; 44 return should_persist_;
45 } 45 }
46 46
47 bool DomStorageSession::IsFromContext(DomStorageContext* context) { 47 bool DomStorageSession::IsFromContext(DomStorageContext* context) {
48 return context_.get() == context; 48 return context_.get() == context;
49 } 49 }
50 50
51 DomStorageSession* DomStorageSession::Clone() { 51 DomStorageSession* DomStorageSession::Clone() {
52 return CloneFrom(context_, namespace_id_); 52 return CloneFrom(context_.get(), namespace_id_);
53 } 53 }
54 54
55 // static 55 // static
56 DomStorageSession* DomStorageSession::CloneFrom(DomStorageContext* context, 56 DomStorageSession* DomStorageSession::CloneFrom(DomStorageContext* context,
57 int64 namepace_id_to_clone) { 57 int64 namepace_id_to_clone) {
58 int64 clone_id = context->AllocateSessionId(); 58 int64 clone_id = context->AllocateSessionId();
59 std::string persistent_clone_id = context->AllocatePersistentSessionId(); 59 std::string persistent_clone_id = context->AllocatePersistentSessionId();
60 context->task_runner()->PostTask( 60 context->task_runner()->PostTask(
61 FROM_HERE, 61 FROM_HERE,
62 base::Bind(&DomStorageContext::CloneSessionNamespace, 62 base::Bind(&DomStorageContext::CloneSessionNamespace,
(...skipping 12 matching lines...) Expand all
75 } 75 }
76 76
77 DomStorageSession::~DomStorageSession() { 77 DomStorageSession::~DomStorageSession() {
78 context_->task_runner()->PostTask( 78 context_->task_runner()->PostTask(
79 FROM_HERE, 79 FROM_HERE,
80 base::Bind(&DomStorageContext::DeleteSessionNamespace, 80 base::Bind(&DomStorageContext::DeleteSessionNamespace,
81 context_, namespace_id_, should_persist_)); 81 context_, namespace_id_, should_persist_));
82 } 82 }
83 83
84 } // namespace dom_storage 84 } // namespace dom_storage
OLDNEW
« no previous file with comments | « webkit/dom_storage/dom_storage_namespace.cc ('k') | webkit/glue/resource_request_body_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698