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

Unified Diff: webkit/dom_storage/dom_storage_host.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, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/dom_storage/dom_storage_context_unittest.cc ('k') | webkit/dom_storage/dom_storage_namespace.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/dom_storage/dom_storage_host.cc
diff --git a/webkit/dom_storage/dom_storage_host.cc b/webkit/dom_storage/dom_storage_host.cc
index 7f4fca1f5b0412e8daf32a53b490cb042dfaac13..4d53d7a409f9b07ea0fc945dfa419bbcc82a59d8 100644
--- a/webkit/dom_storage/dom_storage_host.cc
+++ b/webkit/dom_storage/dom_storage_host.cc
@@ -19,7 +19,7 @@ DomStorageHost::DomStorageHost(DomStorageContext* context)
DomStorageHost::~DomStorageHost() {
AreaMap::const_iterator it = connections_.begin();
for (; it != connections_.end(); ++it)
- it->second.namespace_->CloseStorageArea(it->second.area_);
+ it->second.namespace_->CloseStorageArea(it->second.area_.get());
connections_.clear(); // Clear prior to releasing the context_
}
@@ -30,14 +30,14 @@ bool DomStorageHost::OpenStorageArea(int connection_id, int namespace_id,
return false; // Indicates the renderer gave us very bad data.
NamespaceAndArea references;
references.namespace_ = context_->GetStorageNamespace(namespace_id);
- if (!references.namespace_) {
+ if (!references.namespace_.get()) {
// TODO(michaeln): Fix crbug/134003 and return false here.
// Until then return true to avoid crashing the renderer for
// sending a bad message.
return true;
}
references.area_ = references.namespace_->OpenStorageArea(origin);
- DCHECK(references.area_);
+ DCHECK(references.area_.get());
connections_[connection_id] = references;
return true;
}
@@ -46,8 +46,7 @@ void DomStorageHost::CloseStorageArea(int connection_id) {
AreaMap::iterator found = connections_.find(connection_id);
if (found == connections_.end())
return;
- found->second.namespace_->CloseStorageArea(
- found->second.area_);
+ found->second.namespace_->CloseStorageArea(found->second.area_.get());
connections_.erase(found);
}
@@ -152,14 +151,14 @@ DomStorageArea* DomStorageHost::GetOpenArea(int connection_id) {
AreaMap::iterator found = connections_.find(connection_id);
if (found == connections_.end())
return NULL;
- return found->second.area_;
+ return found->second.area_.get();
}
DomStorageNamespace* DomStorageHost::GetNamespace(int connection_id) {
AreaMap::iterator found = connections_.find(connection_id);
if (found == connections_.end())
return NULL;
- return found->second.namespace_;
+ return found->second.namespace_.get();
}
// NamespaceAndArea
« no previous file with comments | « webkit/dom_storage/dom_storage_context_unittest.cc ('k') | webkit/dom_storage/dom_storage_namespace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698