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

Unified Diff: content/common/dom_storage/dom_storage_map.h

Issue 22297005: Move webkit/{browser,common}/dom_storage into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « content/common/dom_storage/OWNERS ('k') | content/common/dom_storage/dom_storage_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/dom_storage/dom_storage_map.h
diff --git a/webkit/common/dom_storage/dom_storage_map.h b/content/common/dom_storage/dom_storage_map.h
similarity index 59%
rename from webkit/common/dom_storage/dom_storage_map.h
rename to content/common/dom_storage/dom_storage_map.h
index 69db984e380faaf8875cd933b48050198915b928..59c4357c775bd6166e61f361fa43baf92b3f6110 100644
--- a/webkit/common/dom_storage/dom_storage_map.h
+++ b/content/common/dom_storage/dom_storage_map.h
@@ -2,26 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_COMMON_DOM_STORAGE_DOM_STORAGE_MAP_H_
-#define WEBKIT_COMMON_DOM_STORAGE_DOM_STORAGE_MAP_H_
+#ifndef CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_MAP_H_
+#define CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_MAP_H_
#include <map>
#include "base/memory/ref_counted.h"
#include "base/strings/nullable_string16.h"
#include "base/strings/string16.h"
-#include "webkit/common/dom_storage/dom_storage_types.h"
-#include "webkit/common/webkit_storage_common_export.h"
+#include "content/common/content_export.h"
+#include "content/common/dom_storage/dom_storage_types.h"
-namespace dom_storage {
+namespace content {
// A wrapper around a std::map that adds refcounting and
// tracks the size in bytes of the keys/values, enforcing a quota.
-// See class comments for DomStorageContext for a larger overview.
-class WEBKIT_STORAGE_COMMON_EXPORT DomStorageMap
- : public base::RefCountedThreadSafe<DomStorageMap> {
+// See class comments for DOMStorageContextImpl for a larger overview.
+class CONTENT_EXPORT DOMStorageMap
+ : public base::RefCountedThreadSafe<DOMStorageMap> {
public:
- explicit DomStorageMap(size_t quota);
+ explicit DOMStorageMap(size_t quota);
unsigned Length() const;
base::NullableString16 Key(unsigned index);
@@ -33,32 +33,32 @@ class WEBKIT_STORAGE_COMMON_EXPORT DomStorageMap
// Swaps this instances values_ with |map|.
// Note: to grandfather in pre-existing files that are overbudget,
// this method does not do quota checking.
- void SwapValues(ValuesMap* map);
+ void SwapValues(DOMStorageValuesMap* map);
// Writes a copy of the current set of values_ to the |map|.
- void ExtractValues(ValuesMap* map) const { *map = values_; }
+ void ExtractValues(DOMStorageValuesMap* map) const { *map = values_; }
- // Creates a new instance of DomStorageMap containing
+ // Creates a new instance of DOMStorageMap containing
// a deep copy of values_.
- DomStorageMap* DeepCopy() const;
+ DOMStorageMap* DeepCopy() const;
size_t bytes_used() const { return bytes_used_; }
size_t quota() const { return quota_; }
void set_quota(size_t quota) { quota_ = quota; }
private:
- friend class base::RefCountedThreadSafe<DomStorageMap>;
- ~DomStorageMap();
+ friend class base::RefCountedThreadSafe<DOMStorageMap>;
+ ~DOMStorageMap();
void ResetKeyIterator();
- ValuesMap values_;
- ValuesMap::const_iterator key_iterator_;
+ DOMStorageValuesMap values_;
+ DOMStorageValuesMap::const_iterator key_iterator_;
unsigned last_key_index_;
size_t bytes_used_;
size_t quota_;
};
-} // namespace dom_storage
+} // namespace content
-#endif // WEBKIT_COMMON_DOM_STORAGE_DOM_STORAGE_MAP_H_
+#endif // CONTENT_COMMON_DOM_STORAGE_DOM_STORAGE_MAP_H_
« no previous file with comments | « content/common/dom_storage/OWNERS ('k') | content/common/dom_storage/dom_storage_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698