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

Side by Side Diff: tools/telemetry/telemetry/core/user_agent.py

Issue 669413002: Telemetry: Update the user agent version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 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 UA_TYPE_MAPPING = { 5 UA_TYPE_MAPPING = {
6 'desktop': 6 'desktop':
7 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) ' 7 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) '
8 'AppleWebKit/537.22 (KHTML, like Gecko) ' 8 'AppleWebKit/537.36 (KHTML, like Gecko) '
9 'Chrome/27.0.1453.111 Safari/537.22', 9 'Chrome/40.0.2194.2 Safari/537.36',
10 'mobile': 10 'mobile':
11 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) ' 11 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) '
12 'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/27.0.1453.111 Mobile ' 12 'AppleWebKit/535.36 (KHTML, like Gecko) Chrome/40.0.2194.2 Mobile '
13 'Safari/535.19', 13 'Safari/535.36',
14 'tablet': 14 'tablet':
15 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus 7 Build/IMM76B) ' 15 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus 7 Build/IMM76B) '
16 'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/27.0.1453.111 ' 16 'AppleWebKit/535.36 (KHTML, like Gecko) Chrome/40.0.2194.2 '
17 'Safari/535.19', 17 'Safari/535.36',
18 'tablet_10_inch': 18 'tablet_10_inch':
19 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus 10 Build/IMM76B) ' 19 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus 10 Build/IMM76B) '
20 'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/27.0.1453.111 ' 20 'AppleWebKit/535.36 (KHTML, like Gecko) Chrome/40.0.2194.2 '
21 'Safari/535.19', 21 'Safari/535.36',
22 } 22 }
23 23
24 24
25 def GetChromeUserAgentArgumentFromType(user_agent_type): 25 def GetChromeUserAgentArgumentFromType(user_agent_type):
26 """Returns a chrome user agent based on a user agent type. 26 """Returns a chrome user agent based on a user agent type.
27 This is derived from: 27 This is derived from:
28 https://developers.google.com/chrome/mobile/docs/user-agent 28 https://developers.google.com/chrome/mobile/docs/user-agent
29 """ 29 """
30 if user_agent_type: 30 if user_agent_type:
31 return ['--user-agent=%s' % UA_TYPE_MAPPING[user_agent_type]] 31 return ['--user-agent=%s' % UA_TYPE_MAPPING[user_agent_type]]
32 return [] 32 return []
OLDNEW
« 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