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

Unified Diff: Source/core/page/NavigatorID.cpp

Issue 23444030: Remove unsupported Blink CPUs from CPU.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/wtf/CPU.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/NavigatorID.cpp
diff --git a/Source/core/page/NavigatorID.cpp b/Source/core/page/NavigatorID.cpp
index 593d59ed532cd4433398c1f45d97600182fa6ec5..6f60f5d061006f5c2b3dcb0a5b4b94faf336b3fe 100644
--- a/Source/core/page/NavigatorID.cpp
+++ b/Source/core/page/NavigatorID.cpp
@@ -36,22 +36,10 @@
#include "wtf/CPU.h"
#if OS(LINUX)
-#include "sys/utsname.h"
#include "wtf/StdLibExtras.h"
+#include <sys/utsname.h>
#endif
-#ifndef WEBCORE_NAVIGATOR_PLATFORM
-#if OS(DARWIN) && (CPU(PPC) || CPU(PPC64))
-#define WEBCORE_NAVIGATOR_PLATFORM "MacPPC"
-#elif OS(DARWIN) && (CPU(X86) || CPU(X86_64))
-#define WEBCORE_NAVIGATOR_PLATFORM "MacIntel"
-#elif OS(WINDOWS)
-#define WEBCORE_NAVIGATOR_PLATFORM "Win32"
-#else
-#define WEBCORE_NAVIGATOR_PLATFORM ""
-#endif
-#endif // ifndef WEBCORE_NAVIGATOR_PLATFORM
-
namespace WebCore {
String NavigatorID::appName(const NavigatorBase*)
@@ -73,14 +61,16 @@ String NavigatorID::userAgent(const NavigatorBase* navigator)
String NavigatorID::platform(const NavigatorBase*)
{
+#if defined(WEBCORE_NAVIGATOR_PLATFORM)
+ return WEBCORE_NAVIGATOR_PLATFORM;
+#else
#if OS(LINUX)
- if (!String(WEBCORE_NAVIGATOR_PLATFORM).isEmpty())
- return WEBCORE_NAVIGATOR_PLATFORM;
struct utsname osname;
DEFINE_STATIC_LOCAL(String, platformName, (uname(&osname) >= 0 ? String(osname.sysname) + String(" ") + String(osname.machine) : emptyString()));
return platformName;
#else
- return WEBCORE_NAVIGATOR_PLATFORM;
+#error Non-Linux ports must define WEBCORE_NAVIGATOR_PLATFORM.
+#endif
#endif
}
« no previous file with comments | « no previous file | Source/wtf/CPU.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698