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

Unified Diff: tools/telemetry/telemetry/core/user_agent.py

Issue 12294002: Revert 182991 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/user_agent.py
===================================================================
--- tools/telemetry/telemetry/core/user_agent.py (revision 182999)
+++ tools/telemetry/telemetry/core/user_agent.py (working copy)
@@ -1,28 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-UA_TYPE_MAPPING = {
- 'desktop':
- 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) '
- 'AppleWebKit/537.22 (KHTML, like Gecko) '
- 'Chrome/25.0.1364.2 Safari/537.22',
- 'mobile':
- 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) '
- 'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile '
- 'Safari/535.19',
- 'tablet':
- 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus 7 Build/IMM76B) '
- 'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 '
- 'Safari/535.19',
-}
-
-
-def GetChromeUserAgentArgumentFromType(user_agent_type):
- """Returns a chrome user agent based on a user agent type.
- This is derived from:
- https://developers.google.com/chrome/mobile/docs/user-agent
- """
- if user_agent_type:
- return ['--user-agent=%s' % UA_TYPE_MAPPING[user_agent_type]]
- return []

Powered by Google App Engine
This is Rietveld 408576698