# Copyright 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/27.0.1453.111 Safari/537.22',
  'mobile':
      'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) '
      'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/27.0.1453.111 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/27.0.1453.111 '
      'Safari/535.19',
  'tablet_10_inch':
      'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus 10 Build/IMM76B) '
      'AppleWebKit/535.19 (KHTML, like Gecko) Chrome/27.0.1453.111 '
      '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 []

@@ -268,18 +268,18 @@
 Kit/537.
-22
+36
  (KHTML,
@@ -307,29 +307,27 @@
 'Chrome/
-27.0.1453.111
+40.0.2194.2
  Safari/
@@ -334,10 +334,10 @@
 537.
-22
+36
 ',%0A 
@@ -433,34 +433,34 @@
 AppleWebKit/535.
-19
+36
  (KHTML, like Ge
@@ -471,29 +471,27 @@
  Chrome/
-27.0.1453.111
+40.0.2194.2
  Mobile 
@@ -502,34 +502,34 @@
     'Safari/535.
-19
+36
 ',%0A  'tablet':%0A 
@@ -615,34 +615,34 @@
 AppleWebKit/535.
-19
+36
  (KHTML, like Ge
@@ -649,37 +649,35 @@
 cko) Chrome/
-27.0.1453.111
+40.0.2194.2
  '%0A      'Sa
@@ -685,18 +685,18 @@
 ari/535.
-19
+36
 ',%0A  'ta
@@ -807,18 +807,18 @@
 Kit/535.
-19
+36
  (KHTML,
@@ -841,21 +841,19 @@
 ome/
-27.0.1453.111
+40.0.2194.2
  '%0A 
@@ -869,18 +869,18 @@
 ari/535.
-19
+36
 ',%0A%7D%0A%0A%0Ad

Update the user agent version.