OSDN Git Service

cookieインスタンス生成
authoryukihane <yukihane.feather@gmail.com>
Sat, 17 Sep 2011 06:23:43 +0000 (15:23 +0900)
committeryukihane <yukihane.feather@gmail.com>
Sat, 17 Sep 2011 06:23:43 +0000 (15:23 +0900)
frontend/src/saccubus/net/Cookie.java

index 7d4fd34..4317e99 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, FIREFOX3, 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;