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

Side by Side Diff: chrome/test/data/native_messaging/native_hosts/echo.py

Issue 11833021: Rename Native messaging hosts directory to native_hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # A simple native client in python. 6 # A simple native client in python.
7 # All this client does is echo the text it recieves back at the extension. 7 # All this client does is echo the text it recieves back at the extension.
8 8
9 import sys 9 import sys
10 import struct 10 import struct
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 try: 46 try:
47 sys.stdout.write(struct.pack("II", response_type, len(response))) 47 sys.stdout.write(struct.pack("II", response_type, len(response)))
48 sys.stdout.write(response) 48 sys.stdout.write(response)
49 sys.stdout.flush() 49 sys.stdout.flush()
50 except IOError: 50 except IOError:
51 break 51 break
52 52
53 if __name__ == '__main__': 53 if __name__ == '__main__':
54 Main() 54 Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698