jam | 3cf73ae | 2015-05-21 00:48:13 | [diff] [blame] | 1 | // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "mojo/common/user_agent.h" |
| 6 | |
penghuang | e9f3b85 | 2015-07-08 19:10:31 | [diff] [blame] | 7 | #include "build/build_config.h" |
| 8 | |
jam | 3cf73ae | 2015-05-21 00:48:13 | [diff] [blame] | 9 | namespace mojo { |
| 10 | namespace common { |
| 11 | |
| 12 | std::string GetUserAgent() { |
| 13 | // TODO(jam): change depending on OS |
penghuang | e9f3b85 | 2015-07-08 19:10:31 | [diff] [blame] | 14 | #if defined(OS_ANDROID) |
| 15 | return "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 7 Build/LMY48G) " |
| 16 | "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.68 " |
| 17 | "Safari/537.36"; |
| 18 | #else |
jam | 3cf73ae | 2015-05-21 00:48:13 | [diff] [blame] | 19 | return "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like " |
| 20 | "Gecko) Chrome/42.0.2311.68 Safari/537.36"; |
penghuang | e9f3b85 | 2015-07-08 19:10:31 | [diff] [blame] | 21 | #endif |
jam | 3cf73ae | 2015-05-21 00:48:13 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | } // namespace common |
| 25 | } // namespace mojo |