OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Match Safari and Mozilla on Mac x86. | 58 // Match Safari and Mozilla on Mac x86. |
59 return "MacIntel"; | 59 return "MacIntel"; |
60 #elif OS(WIN) | 60 #elif OS(WIN) |
61 // Match Safari and Mozilla on Windows. | 61 // Match Safari and Mozilla on Windows. |
62 return "Win32"; | 62 return "Win32"; |
63 #else // Unix-like systems | 63 #else // Unix-like systems |
64 struct utsname osname; | 64 struct utsname osname; |
65 DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<String>, platformName, | 65 DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<String>, platformName, |
66 new ThreadSpecific<String>()); | 66 new ThreadSpecific<String>()); |
67 if (platformName->isNull()) { | 67 if (platformName->isNull()) { |
68 *platformName = String(uname(&osname) >= 0 | 68 *platformName = |
69 ? String(osname.sysname) + String(" ") + | 69 String(uname(&osname) >= 0 ? String(osname.sysname) + String(" ") + |
70 String(osname.machine) | 70 String(osname.machine) |
71 : emptyString); | 71 : emptyString); |
72 } | 72 } |
73 return *platformName; | 73 return *platformName; |
74 #endif | 74 #endif |
75 } | 75 } |
76 | 76 |
77 String NavigatorID::product() { | 77 String NavigatorID::product() { |
78 return "Gecko"; | 78 return "Gecko"; |
79 } | 79 } |
80 | 80 |
81 } // namespace blink | 81 } // namespace blink |
OLD | NEW |