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

Side by Side Diff: blimp/client/core/settings/user_agent.cc

Issue 2473543002: Set the user agent for 0.6 (Closed)
Patch Set: nits Created 4 years, 1 month 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 | « blimp/client/core/settings/user_agent.h ('k') | 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "blimp/client/app/user_agent.h" 5 #include "blimp/client/core/settings/user_agent.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/sys_info.h" 8 #include "base/sys_info.h"
9 9
10 #if defined(OS_POSIX) && !defined(OS_ANDROID)
11 #include <sys/utsname.h>
12 #endif
13
10 namespace blimp { 14 namespace blimp {
15 namespace client {
11 16
12 /** 17 /**
13 * Returns a string for building user agent such as : 18 * Returns a string for building user agent such as :
14 * Linux; Android 5.1.1; Nexus 6 Build/LMY49C 19 * Linux; Android 5.1.1; Nexus 6 Build/LMY49C
15 */ 20 */
16 std::string GetOSVersionInfoForUserAgent() { 21 std::string GetOSVersionInfoForUserAgent() {
17 std::string os_cpu; 22 std::string os_cpu;
18 23
19 #if defined(OS_ANDROID) 24 #if defined(OS_ANDROID)
20 int32_t os_major_version = 0; 25 int32_t os_major_version = 0;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 unixinfo.sysname, // e.g. Linux 81 unixinfo.sysname, // e.g. Linux
77 cputype.c_str() // e.g. i686 82 cputype.c_str() // e.g. i686
78 #endif 83 #endif
79 ); // NOLINT 84 ); // NOLINT
80 85
81 os_cpu = "Linux; " + os_cpu; 86 os_cpu = "Linux; " + os_cpu;
82 87
83 return os_cpu; 88 return os_cpu;
84 } 89 }
85 90
91 } // namespace client
86 } // namespace blimp 92 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/core/settings/user_agent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698