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

Side by Side Diff: content/browser/dom_storage/session_storage_namespace_impl.cc

Issue 506083002: Remove implicit conversions from scoped_refptr to T* in content/browser/dom_storage/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/browser/dom_storage/dom_storage_namespace.cc ('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 "content/browser/dom_storage/session_storage_namespace_impl.h" 5 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
6 6
7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 7 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
8 #include "content/browser/dom_storage/dom_storage_session.h" 8 #include "content/browser/dom_storage/dom_storage_session.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( 23 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
24 DOMStorageContextWrapper* context, const std::string& persistent_id) 24 DOMStorageContextWrapper* context, const std::string& persistent_id)
25 : session_(new DOMStorageSession(context->context(), persistent_id)) { 25 : session_(new DOMStorageSession(context->context(), persistent_id)) {
26 } 26 }
27 27
28 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl( 28 SessionStorageNamespaceImpl::SessionStorageNamespaceImpl(
29 SessionStorageNamespaceImpl* master_session_storage_namespace) 29 SessionStorageNamespaceImpl* master_session_storage_namespace)
30 : session_(new DOMStorageSession( 30 : session_(new DOMStorageSession(
31 master_session_storage_namespace->session_)) { 31 master_session_storage_namespace->session_.get())) {
32 } 32 }
33 33
34 34
35 int64 SessionStorageNamespaceImpl::id() const { 35 int64 SessionStorageNamespaceImpl::id() const {
36 return session_->namespace_id(); 36 return session_->namespace_id();
37 } 37 }
38 38
39 const std::string& SessionStorageNamespaceImpl::persistent_id() const { 39 const std::string& SessionStorageNamespaceImpl::persistent_id() const {
40 return session_->persistent_namespace_id(); 40 return session_->persistent_namespace_id();
41 } 41 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 session_->RemoveTransactionLogProcessId(process_id); 74 session_->RemoveTransactionLogProcessId(process_id);
75 } 75 }
76 76
77 void SessionStorageNamespaceImpl::Merge( 77 void SessionStorageNamespaceImpl::Merge(
78 bool actually_merge, 78 bool actually_merge,
79 int process_id, 79 int process_id,
80 SessionStorageNamespace* other, 80 SessionStorageNamespace* other,
81 const MergeResultCallback& callback) { 81 const MergeResultCallback& callback) {
82 SessionStorageNamespaceImpl* other_impl = 82 SessionStorageNamespaceImpl* other_impl =
83 static_cast<SessionStorageNamespaceImpl*>(other); 83 static_cast<SessionStorageNamespaceImpl*>(other);
84 session_->Merge(actually_merge, process_id, other_impl->session_, callback); 84 session_->Merge(
85 actually_merge, process_id, other_impl->session_.get(), callback);
85 } 86 }
86 87
87 bool SessionStorageNamespaceImpl::IsAliasOf(SessionStorageNamespace* other) { 88 bool SessionStorageNamespaceImpl::IsAliasOf(SessionStorageNamespace* other) {
88 return persistent_id() == other->persistent_id(); 89 return persistent_id() == other->persistent_id();
89 } 90 }
90 91
91 SessionStorageNamespace* SessionStorageNamespaceImpl::CreateAlias() { 92 SessionStorageNamespace* SessionStorageNamespaceImpl::CreateAlias() {
92 return new SessionStorageNamespaceImpl(this); 93 return new SessionStorageNamespaceImpl(this);
93 } 94 }
94 95
95 } // namespace content 96 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/dom_storage/dom_storage_namespace.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698