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

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

Issue 2473543002: Set the user agent for 0.6 (Closed)
Patch Set: remove settings_feature from BlimpClientSession 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
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 {
11 15
12 /** 16 /**
13 * Returns a string for building user agent such as : 17 * Returns a string for building user agent such as :
14 * Linux; Android 5.1.1; Nexus 6 Build/LMY49C 18 * Linux; Android 5.1.1; Nexus 6 Build/LMY49C
15 */ 19 */
16 std::string GetOSVersionInfoForUserAgent() { 20 std::string GetOSVersionInfoForUserAgent() {
17 std::string os_cpu; 21 std::string os_cpu;
18 22
19 #if defined(OS_ANDROID) 23 #if defined(OS_ANDROID)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 cputype.c_str() // e.g. i686 81 cputype.c_str() // e.g. i686
78 #endif 82 #endif
79 ); // NOLINT 83 ); // NOLINT
80 84
81 os_cpu = "Linux; " + os_cpu; 85 os_cpu = "Linux; " + os_cpu;
82 86
83 return os_cpu; 87 return os_cpu;
84 } 88 }
85 89
86 } // namespace blimp 90 } // namespace blimp
OLDNEW
« blimp/client/core/settings/user_agent.h ('K') | « 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