OSDN Git Service

リファクタリング
[coroid/inqubus.git] / frontend / src / saccubus / net / Cookie.java
index 7d4fd34..ccfa485 100644 (file)
@@ -14,15 +14,19 @@ public abstract class Cookie {
 
     public enum BrowserType {
 
-        NONE, MSIE, IE6, Firefox3, Firefox, Chrome,
-        Opera, Chromium, Other
+        NONE, MSIE, IE6, FIREFOX, CHROME,
+        OPERA, CHROMIUM, OTHER
     }
 
     public static Cookie create(BrowserType type) {
-        if (type == BrowserType.Chrome) {
-            return new CookieWinCrome();
+        switch (type) {
+            case CHROME:
+                return new CookieWinCrome();
+            case FIREFOX:
+                return new CookieWinFirefox4();
+            default:
+                throw new UnsupportedOperationException();
         }
-        throw new UnsupportedOperationException();
     }
 
     public abstract String getUserSessionString() throws IOException;