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

Unified Diff: webkit/dom_storage/dom_storage_cached_area.cc

Issue 13219005: Replace string16 with base::string16 in src/webkit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
Index: webkit/dom_storage/dom_storage_cached_area.cc
diff --git a/webkit/dom_storage/dom_storage_cached_area.cc b/webkit/dom_storage/dom_storage_cached_area.cc
index 30d6291d32a5e184f9aa013b3f4a81b658b23a02..af5e1f488fcdf66b5a187c0cc6e56f1f5b6657da 100644
--- a/webkit/dom_storage/dom_storage_cached_area.cc
+++ b/webkit/dom_storage/dom_storage_cached_area.cc
@@ -34,14 +34,14 @@ NullableString16 DomStorageCachedArea::GetKey(
}
NullableString16 DomStorageCachedArea::GetItem(
- int connection_id, const string16& key) {
+ int connection_id, const base::string16& key) {
PrimeIfNeeded(connection_id);
return map_->GetItem(key);
}
bool DomStorageCachedArea::SetItem(
- int connection_id, const string16& key,
- const string16& value, const GURL& page_url) {
+ int connection_id, const base::string16& key,
+ const base::string16& value, const GURL& page_url) {
// A quick check to reject obviously overbudget items to avoid
// the priming the cache.
if (key.length() + value.length() > dom_storage::kPerAreaQuota)
@@ -62,9 +62,9 @@ bool DomStorageCachedArea::SetItem(
}
void DomStorageCachedArea::RemoveItem(
- int connection_id, const string16& key, const GURL& page_url) {
+ int connection_id, const base::string16& key, const GURL& page_url) {
PrimeIfNeeded(connection_id);
- string16 unused;
+ base::string16 unused;
if (!map_->RemoveItem(key, &unused))
return;
@@ -101,7 +101,8 @@ void DomStorageCachedArea::ApplyMutation(
// We have to retain local additions which happened after this
// clear operation from another process.
- std::map<string16, int>::iterator iter = ignore_key_mutations_.begin();
+ std::map<base::string16, int>::iterator iter =
+ ignore_key_mutations_.begin();
while (iter != ignore_key_mutations_.end()) {
NullableString16 value = old->GetItem(iter->first);
if (!value.is_null()) {
@@ -119,7 +120,7 @@ void DomStorageCachedArea::ApplyMutation(
if (new_value.is_null()) {
// It's a remove item event.
- string16 unused;
+ base::string16 unused;
map_->RemoveItem(key.string(), &unused);
return;
}
@@ -198,21 +199,23 @@ void DomStorageCachedArea::OnLoadComplete(bool success) {
}
void DomStorageCachedArea::OnSetItemComplete(
- const string16& key, bool success) {
+ const base::string16& key, bool success) {
if (!success) {
Reset();
return;
}
- std::map<string16, int>::iterator found = ignore_key_mutations_.find(key);
+ std::map<base::string16, int>::iterator found =
+ ignore_key_mutations_.find(key);
DCHECK(found != ignore_key_mutations_.end());
if (--found->second == 0)
ignore_key_mutations_.erase(found);
}
void DomStorageCachedArea::OnRemoveItemComplete(
- const string16& key, bool success) {
+ const base::string16& key, bool success) {
DCHECK(success);
- std::map<string16, int>::iterator found = ignore_key_mutations_.find(key);
+ std::map<base::string16, int>::iterator found =
+ ignore_key_mutations_.find(key);
DCHECK(found != ignore_key_mutations_.end());
if (--found->second == 0)
ignore_key_mutations_.erase(found);

Powered by Google App Engine
This is Rietveld 408576698