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/browser/dom_storage/dom_storage_host.cc

Issue 15990007: Move dom_storage to new locations. (Closed) Base URL: svn://chrome-svn/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/browser/dom_storage/dom_storage_host.h ('k') | webkit/browser/dom_storage/dom_storage_namespace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/dom_storage/dom_storage_host.cc
===================================================================
--- webkit/browser/dom_storage/dom_storage_host.cc (revision 0)
+++ webkit/browser/dom_storage/dom_storage_host.cc (working copy)
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/dom_storage/dom_storage_host.h"
+#include "webkit/browser/dom_storage/dom_storage_host.h"
#include "googleurl/src/gurl.h"
-#include "webkit/dom_storage/dom_storage_area.h"
-#include "webkit/dom_storage/dom_storage_context.h"
-#include "webkit/dom_storage/dom_storage_namespace.h"
-#include "webkit/dom_storage/dom_storage_types.h"
+#include "webkit/browser/dom_storage/dom_storage_area.h"
+#include "webkit/browser/dom_storage/dom_storage_context.h"
+#include "webkit/browser/dom_storage/dom_storage_namespace.h"
+#include "webkit/common/dom_storage/dom_storage_types.h"
namespace dom_storage {
@@ -19,7 +19,7 @@
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 @@
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 @@
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 @@
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/browser/dom_storage/dom_storage_host.h ('k') | webkit/browser/dom_storage/dom_storage_namespace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698