| 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 22 matching lines...) Expand all Loading... |
| 33 #include "NavigatorID.h" | 33 #include "NavigatorID.h" |
| 34 | 34 |
| 35 #include "core/page/NavigatorBase.h" | 35 #include "core/page/NavigatorBase.h" |
| 36 #include "wtf/CPU.h" | 36 #include "wtf/CPU.h" |
| 37 | 37 |
| 38 #if OS(LINUX) | 38 #if OS(LINUX) |
| 39 #include "wtf/StdLibExtras.h" | 39 #include "wtf/StdLibExtras.h" |
| 40 #include <sys/utsname.h> | 40 #include <sys/utsname.h> |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 #ifndef WEBCORE_NAVIGATOR_PRODUCT |
| 44 #define WEBCORE_NAVIGATOR_PRODUCT "Gecko" |
| 45 #endif // ifndef WEBCORE_NAVIGATOR_PRODUCT |
| 46 |
| 43 namespace WebCore { | 47 namespace WebCore { |
| 44 | 48 |
| 45 String NavigatorID::appName(const NavigatorBase*) | 49 String NavigatorID::appName(const NavigatorBase*) |
| 46 { | 50 { |
| 47 return "Netscape"; | 51 return "Netscape"; |
| 48 } | 52 } |
| 49 | 53 |
| 50 String NavigatorID::appVersion(const NavigatorBase* navigator) | 54 String NavigatorID::appVersion(const NavigatorBase* navigator) |
| 51 { | 55 { |
| 52 // Version is everything in the user agent string past the "Mozilla/" prefix
. | 56 // Version is everything in the user agent string past the "Mozilla/" prefix
. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 67 #if OS(LINUX) | 71 #if OS(LINUX) |
| 68 struct utsname osname; | 72 struct utsname osname; |
| 69 DEFINE_STATIC_LOCAL(String, platformName, (uname(&osname) >= 0 ? String(osna
me.sysname) + String(" ") + String(osname.machine) : emptyString())); | 73 DEFINE_STATIC_LOCAL(String, platformName, (uname(&osname) >= 0 ? String(osna
me.sysname) + String(" ") + String(osname.machine) : emptyString())); |
| 70 return platformName; | 74 return platformName; |
| 71 #else | 75 #else |
| 72 #error Non-Linux ports must define WEBCORE_NAVIGATOR_PLATFORM. | 76 #error Non-Linux ports must define WEBCORE_NAVIGATOR_PLATFORM. |
| 73 #endif | 77 #endif |
| 74 #endif | 78 #endif |
| 75 } | 79 } |
| 76 | 80 |
| 81 String NavigatorID::appCodeName(const NavigatorBase*) |
| 82 { |
| 83 return "Mozilla"; |
| 84 } |
| 85 |
| 86 String NavigatorID::product(const NavigatorBase*) |
| 87 { |
| 88 return WEBCORE_NAVIGATOR_PRODUCT; |
| 89 } |
| 90 |
| 77 } // namespace WebCore | 91 } // namespace WebCore |
| OLD | NEW |