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

Unified Diff: chrome/browser/extensions/api/socket/socket_api.cc

Issue 10168021: Pass through readInfo.resultCode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve test. Created 8 years, 8 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 | « no previous file | chrome/common/extensions/api/experimental.socket.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/socket/socket_api.cc
diff --git a/chrome/browser/extensions/api/socket/socket_api.cc b/chrome/browser/extensions/api/socket/socket_api.cc
index 08e17c97ae0421f099b2f7d6cd7b8dc0e551ffb6..e3e2f3f05d4b37b82e3c779a3ac65dd42e6f02b3 100644
--- a/chrome/browser/extensions/api/socket/socket_api.cc
+++ b/chrome/browser/extensions/api/socket/socket_api.cc
@@ -16,6 +16,7 @@ namespace extensions {
const char kBytesWrittenKey[] = "bytesWritten";
const char kDataKey[] = "data";
+const char kResultCodeKey[] = "resultCode";
const char kSocketIdKey[] = "socketId";
const char kTCPOption[] = "tcp";
const char kUDPOption[] = "udp";
@@ -147,6 +148,7 @@ void SocketReadFunction::Work() {
data_value->Set(i, Value::CreateIntegerValue(io_buffer_start[i]));
}
}
+ result->SetInteger(kResultCodeKey, bytes_read);
result->Set(kDataKey, data_value);
result_.reset(result);
}
« no previous file with comments | « no previous file | chrome/common/extensions/api/experimental.socket.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698