| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/appcache/appcache_interfaces.h" | 5 #include "webkit/appcache/appcache_interfaces.h" |
| 6 | 6 |
| 7 #include "googleurl/src/gurl.h" | 7 #include "googleurl/src/gurl.h" |
| 8 #include "net/url_request/url_request.h" | 8 #include "net/url_request/url_request.h" |
| 9 #include "webkit/api/public/WebApplicationCacheHost.h" | 9 #include "webkit/api/public/WebApplicationCacheHost.h" |
| 10 | 10 |
| 11 using WebKit::WebApplicationCacheHost; | 11 using WebKit::WebApplicationCacheHost; |
| 12 | 12 |
| 13 namespace appcache { | 13 namespace appcache { |
| 14 | 14 |
| 15 const char kManifestMimeType[] = "text/cache-manifest"; |
| 16 |
| 15 const char kHttpScheme[] = "http"; | 17 const char kHttpScheme[] = "http"; |
| 16 const char kHttpsScheme[] = "https"; | 18 const char kHttpsScheme[] = "https"; |
| 17 const char kHttpGETMethod[] = "GET"; | 19 const char kHttpGETMethod[] = "GET"; |
| 18 const char kHttpHEADMethod[] = "HEAD"; | 20 const char kHttpHEADMethod[] = "HEAD"; |
| 19 | 21 |
| 20 bool IsSchemeSupported(const GURL& url) { | 22 bool IsSchemeSupported(const GURL& url) { |
| 21 bool supported = url.SchemeIs(kHttpScheme) || url.SchemeIs(kHttpsScheme); | 23 bool supported = url.SchemeIs(kHttpScheme) || url.SchemeIs(kHttpsScheme); |
| 22 #ifndef NDEBUG | 24 #ifndef NDEBUG |
| 23 supported |= url.SchemeIsFile(); | 25 supported |= url.SchemeIsFile(); |
| 24 #endif | 26 #endif |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 COMPILE_ASSERT((int)WebApplicationCacheHost::ProgressEvent == | 61 COMPILE_ASSERT((int)WebApplicationCacheHost::ProgressEvent == |
| 60 (int)PROGRESS_EVENT, ProgressEvent); | 62 (int)PROGRESS_EVENT, ProgressEvent); |
| 61 COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReadyEvent == | 63 COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReadyEvent == |
| 62 (int)UPDATE_READY_EVENT, UpdateReadyEvent); | 64 (int)UPDATE_READY_EVENT, UpdateReadyEvent); |
| 63 COMPILE_ASSERT((int)WebApplicationCacheHost::CachedEvent == | 65 COMPILE_ASSERT((int)WebApplicationCacheHost::CachedEvent == |
| 64 (int)CACHED_EVENT, CachedEvent); | 66 (int)CACHED_EVENT, CachedEvent); |
| 65 COMPILE_ASSERT((int)WebApplicationCacheHost::ObsoleteEvent == | 67 COMPILE_ASSERT((int)WebApplicationCacheHost::ObsoleteEvent == |
| 66 (int)OBSOLETE_EVENT, ObsoleteEvent); | 68 (int)OBSOLETE_EVENT, ObsoleteEvent); |
| 67 | 69 |
| 68 } // namespace | 70 } // namespace |
| OLD | NEW |