| OLD | NEW |
| 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/renderer/dom_storage/webstoragenamespace_impl.h" | 5 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/renderer/dom_storage/webstoragearea_impl.h" | 8 #include "content/renderer/dom_storage/webstoragearea_impl.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 11 #include "webkit/dom_storage/dom_storage_types.h" | 11 #include "webkit/dom_storage/dom_storage_types.h" |
| 12 | 12 |
| 13 using WebKit::WebStorageArea; | 13 using WebKit::WebStorageArea; |
| 14 using WebKit::WebStorageNamespace; | 14 using WebKit::WebStorageNamespace; |
| 15 using WebKit::WebString; | 15 using WebKit::WebString; |
| 16 | 16 |
| 17 namespace content { |
| 18 |
| 17 WebStorageNamespaceImpl::WebStorageNamespaceImpl() | 19 WebStorageNamespaceImpl::WebStorageNamespaceImpl() |
| 18 : namespace_id_(dom_storage::kLocalStorageNamespaceId) { | 20 : namespace_id_(dom_storage::kLocalStorageNamespaceId) { |
| 19 } | 21 } |
| 20 | 22 |
| 21 WebStorageNamespaceImpl::WebStorageNamespaceImpl( | 23 WebStorageNamespaceImpl::WebStorageNamespaceImpl( |
| 22 int64 namespace_id) | 24 int64 namespace_id) |
| 23 : namespace_id_(namespace_id) { | 25 : namespace_id_(namespace_id) { |
| 24 DCHECK_NE(dom_storage::kInvalidSessionStorageNamespaceId, namespace_id); | 26 DCHECK_NE(dom_storage::kInvalidSessionStorageNamespaceId, namespace_id); |
| 25 } | 27 } |
| 26 | 28 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 39 // anything here, now. | 41 // anything here, now. |
| 40 return NULL; | 42 return NULL; |
| 41 } | 43 } |
| 42 | 44 |
| 43 bool WebStorageNamespaceImpl::isSameNamespace( | 45 bool WebStorageNamespaceImpl::isSameNamespace( |
| 44 const WebStorageNamespace& other) const { | 46 const WebStorageNamespace& other) const { |
| 45 const WebStorageNamespaceImpl* other_impl = | 47 const WebStorageNamespaceImpl* other_impl = |
| 46 static_cast<const WebStorageNamespaceImpl*>(&other); | 48 static_cast<const WebStorageNamespaceImpl*>(&other); |
| 47 return namespace_id_ == other_impl->namespace_id_; | 49 return namespace_id_ == other_impl->namespace_id_; |
| 48 } | 50 } |
| 51 |
| 52 } // namespace content |
| OLD | NEW |