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

Side by Side Diff: tools/telemetry/telemetry/core/chrome/tracing_backend.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import cStringIO 5 import cStringIO
6 import json 6 import json
7 import logging 7 import logging
8 import socket 8 import socket
9 import threading 9 import threading
10 10
11 11
12 from telemetry import trace_event_importer 12 from telemetry.core import util
13 from telemetry import trace_result 13 from telemetry.core.chrome import trace_event_importer
14 from telemetry import util 14 from telemetry.core.chrome import trace_result
15 from telemetry import websocket 15 from telemetry.core.chrome import websocket
16 16
17 17
18 class TracingUnsupportedException(Exception): 18 class TracingUnsupportedException(Exception):
19 pass 19 pass
20 20
21 class TraceResultImpl(object): 21 class TraceResultImpl(object):
22 def __init__(self, tracing_data): 22 def __init__(self, tracing_data):
23 self._tracing_data = tracing_data 23 self._tracing_data = tracing_data
24 24
25 def Serialize(self, f): 25 def Serialize(self, f):
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 logging.debug('got [%s]', data) 124 logging.debug('got [%s]', data)
125 res = json.loads(data) 125 res = json.loads(data)
126 if res['id'] != req['id']: 126 if res['id'] != req['id']:
127 logging.debug('Dropped reply: %s', json.dumps(res)) 127 logging.debug('Dropped reply: %s', json.dumps(res))
128 continue 128 continue
129 if res.get('response'): 129 if res.get('response'):
130 raise TracingUnsupportedException( 130 raise TracingUnsupportedException(
131 'Tracing not supported for this browser') 131 'Tracing not supported for this browser')
132 elif 'error' in res: 132 elif 'error' in res:
133 return 133 return
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698