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

Unified Diff: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc

Issue 174484: Add a nullable string16 class to base. It combines a string16 + a null param... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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
Index: chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc
===================================================================
--- chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc (revision 24540)
+++ chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc (working copy)
@@ -4,8 +4,8 @@
#include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h"
+#include "base/nullable_string16.h"
#include "base/stl_util-inl.h"
-#include "base/string16.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/in_process_webkit/webkit_context.h"
#include "chrome/browser/in_process_webkit/webkit_thread.h"
@@ -263,9 +263,8 @@
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
WebStorageArea* storage_area = GetStorageArea(storage_area_id);
CHECK(storage_area); // TODO(jorlow): Do better than this.
- WebString key = storage_area->key(index);
- ViewHostMsg_DOMStorageKey::WriteReplyParams(reply_msg, (string16)key,
- key.isNull());
+ const NullableString16& key = storage_area->key(index);
+ ViewHostMsg_DOMStorageKey::WriteReplyParams(reply_msg, key);
Send(reply_msg);
}
@@ -284,9 +283,8 @@
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::WEBKIT));
WebStorageArea* storage_area = GetStorageArea(storage_area_id);
CHECK(storage_area); // TODO(jorlow): Do better than this.
- WebString value = storage_area->getItem(key);
- ViewHostMsg_DOMStorageGetItem::WriteReplyParams(reply_msg, (string16)value,
- value.isNull());
+ const NullableString16& value = storage_area->getItem(key);
+ ViewHostMsg_DOMStorageGetItem::WriteReplyParams(reply_msg, value);
Send(reply_msg);
}
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698