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

Side by Side Diff: tools/telemetry/telemetry/core/chrome/inspector_page.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 import json 4 import json
5 import logging 5 import logging
6 6
7 from telemetry import util 7 from telemetry.core import util
8 8
9 class InspectorPage(object): 9 class InspectorPage(object):
10 def __init__(self, inspector_backend): 10 def __init__(self, inspector_backend):
11 self._inspector_backend = inspector_backend 11 self._inspector_backend = inspector_backend
12 self._inspector_backend.RegisterDomain( 12 self._inspector_backend.RegisterDomain(
13 'Page', 13 'Page',
14 self._OnNotification, 14 self._OnNotification,
15 self._OnClose) 15 self._OnClose)
16 self._navigation_pending = False 16 self._navigation_pending = False
17 17
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 """Returns the value of the cookie by the given |name|.""" 86 """Returns the value of the cookie by the given |name|."""
87 request = { 87 request = {
88 'method': 'Page.getCookies' 88 'method': 'Page.getCookies'
89 } 89 }
90 res = self._inspector_backend.SyncRequest(request, timeout) 90 res = self._inspector_backend.SyncRequest(request, timeout)
91 cookies = res['result']['cookies'] 91 cookies = res['result']['cookies']
92 for cookie in cookies: 92 for cookie in cookies:
93 if cookie['name'] == name: 93 if cookie['name'] == name:
94 return cookie['value'] 94 return cookie['value']
95 return None 95 return None
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698