| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "third_party/WebKit/Source/WebKit/chromium/public/WebApplicationCacheHo
st.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebApplicationCacheHo
st.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
| 11 | 11 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 Namespace::~Namespace() { | 58 Namespace::~Namespace() { |
| 59 } | 59 } |
| 60 | 60 |
| 61 | 61 |
| 62 bool IsSchemeSupported(const GURL& url) { | 62 bool IsSchemeSupported(const GURL& url) { |
| 63 bool supported = url.SchemeIs(kHttpScheme) || url.SchemeIs(kHttpsScheme); | 63 bool supported = url.SchemeIs(kHttpScheme) || url.SchemeIs(kHttpsScheme); |
| 64 #ifndef NDEBUG | 64 #ifndef NDEBUG |
| 65 // TODO(michaeln): It would be really nice if this could optionally work for | 65 // TODO(michaeln): It would be really nice if this could optionally work for |
| 66 // file urls too to help web developers experiment and test their apps, | 66 // file and filesystem urls too to help web developers experiment and test |
| 67 // perhaps enabled via a cmd line flag or some other developer tool setting. | 67 // their apps, perhaps enabled via a cmd line flag or some other developer |
| 68 // Unfortunately file scheme net::URLRequest don't produce the same signalling | 68 // tool setting. Unfortunately file scheme net::URLRequests don't produce the |
| 69 // (200 response codes, headers) as http URLRequests, so this doesn't work | 69 // same signalling (200 response codes, headers) as http URLRequests, so this |
| 70 // just yet. | 70 // doesn't work just yet. |
| 71 // supported |= url.SchemeIsFile(); | 71 // supported |= url.SchemeIsFile(); |
| 72 #endif | 72 #endif |
| 73 return supported; | 73 return supported; |
| 74 } | 74 } |
| 75 | 75 |
| 76 bool IsMethodSupported(const std::string& method) { | 76 bool IsMethodSupported(const std::string& method) { |
| 77 return (method == kHttpGETMethod) || (method == kHttpHEADMethod); | 77 return (method == kHttpGETMethod) || (method == kHttpHEADMethod); |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool IsSchemeAndMethodSupported(const net::URLRequest* request) { | 80 bool IsSchemeAndMethodSupported(const net::URLRequest* request) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 COMPILE_ASSERT((int)WebConsoleMessage::LevelTip == | 115 COMPILE_ASSERT((int)WebConsoleMessage::LevelTip == |
| 116 (int)LOG_TIP, LevelTip); | 116 (int)LOG_TIP, LevelTip); |
| 117 COMPILE_ASSERT((int)WebConsoleMessage::LevelLog == | 117 COMPILE_ASSERT((int)WebConsoleMessage::LevelLog == |
| 118 (int)LOG_INFO, LevelLog); | 118 (int)LOG_INFO, LevelLog); |
| 119 COMPILE_ASSERT((int)WebConsoleMessage::LevelWarning == | 119 COMPILE_ASSERT((int)WebConsoleMessage::LevelWarning == |
| 120 (int)LOG_WARNING, LevelWarning); | 120 (int)LOG_WARNING, LevelWarning); |
| 121 COMPILE_ASSERT((int)WebConsoleMessage::LevelError == | 121 COMPILE_ASSERT((int)WebConsoleMessage::LevelError == |
| 122 (int)LOG_ERROR, LevelError); | 122 (int)LOG_ERROR, LevelError); |
| 123 | 123 |
| 124 } // namespace appcache | 124 } // namespace appcache |
| OLD | NEW |