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

Unified Diff: chrome/common/extensions/docs/examples/api/nativeMessaging/host/native-messaging-example-host

Issue 138133015: Update comments in the Native Messaging example (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/examples/api/nativeMessaging/host/native-messaging-example-host
diff --git a/chrome/common/extensions/docs/examples/api/nativeMessaging/host/native-messaging-example-host b/chrome/common/extensions/docs/examples/api/nativeMessaging/host/native-messaging-example-host
index bda9af4b0af08ae717f8dd0679131101bd18f45a..89da1c07373ccd1e7042e27f92e54f6b9678f685 100755
--- a/chrome/common/extensions/docs/examples/api/nativeMessaging/host/native-messaging-example-host
+++ b/chrome/common/extensions/docs/examples/api/nativeMessaging/host/native-messaging-example-host
@@ -29,7 +29,7 @@ def send_message(message):
def read_thread_func(queue):
message_number = 0
while 1:
- # Read the message type (first 4 bytes).
+ # Read the message length (first 4 bytes).
text_length_bytes = sys.stdin.read(4)
if len(text_length_bytes) == 0:
@@ -37,7 +37,7 @@ def read_thread_func(queue):
queue.put(None)
sys.exit(0)
- # Read the message length (4 bytes).
+ # Unpack message length as 4 byte integer.
text_length = struct.unpack('i', text_length_bytes)[0]
# Read the text (JSON object) of the message.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698