OLD | NEW |
1 // Copyright (c) 2012 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/common/appcache/appcache_interfaces.h" | 5 #include "webkit/common/appcache/appcache_interfaces.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 is_intercept(false), | 42 is_intercept(false), |
43 is_fallback(false), | 43 is_fallback(false), |
44 is_foreign(false), | 44 is_foreign(false), |
45 is_explicit(false), | 45 is_explicit(false), |
46 response_id(kNoResponseId) { | 46 response_id(kNoResponseId) { |
47 } | 47 } |
48 | 48 |
49 AppCacheResourceInfo::~AppCacheResourceInfo() { | 49 AppCacheResourceInfo::~AppCacheResourceInfo() { |
50 } | 50 } |
51 | 51 |
| 52 ErrorDetails::ErrorDetails() |
| 53 : message(), |
| 54 reason(UNKNOWN_ERROR), |
| 55 url(), |
| 56 status(0), |
| 57 is_cross_origin(false) {} |
| 58 |
| 59 ErrorDetails::ErrorDetails( |
| 60 std::string in_message, |
| 61 ErrorReason in_reason, |
| 62 GURL in_url, |
| 63 int in_status, |
| 64 bool in_is_cross_origin) |
| 65 : message(in_message), |
| 66 reason(in_reason), |
| 67 url(in_url), |
| 68 status(in_status), |
| 69 is_cross_origin(in_is_cross_origin) {} |
| 70 |
| 71 ErrorDetails::~ErrorDetails() {} |
| 72 |
52 Namespace::Namespace() | 73 Namespace::Namespace() |
53 : type(FALLBACK_NAMESPACE), | 74 : type(FALLBACK_NAMESPACE), |
54 is_pattern(false), | 75 is_pattern(false), |
55 is_executable(false) { | 76 is_executable(false) { |
56 } | 77 } |
57 | 78 |
58 Namespace::Namespace( | 79 Namespace::Namespace( |
59 NamespaceType type, const GURL& url, const GURL& target, bool is_pattern) | 80 NamespaceType type, const GURL& url, const GURL& target, bool is_pattern) |
60 : type(type), | 81 : type(type), |
61 namespace_url(url), | 82 namespace_url(url), |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bool IsMethodSupported(const std::string& method) { | 129 bool IsMethodSupported(const std::string& method) { |
109 return (method == kHttpGETMethod) || (method == kHttpHEADMethod); | 130 return (method == kHttpGETMethod) || (method == kHttpHEADMethod); |
110 } | 131 } |
111 | 132 |
112 bool IsSchemeAndMethodSupported(const net::URLRequest* request) { | 133 bool IsSchemeAndMethodSupported(const net::URLRequest* request) { |
113 return IsSchemeSupported(request->url()) && | 134 return IsSchemeSupported(request->url()) && |
114 IsMethodSupported(request->method()); | 135 IsMethodSupported(request->method()); |
115 } | 136 } |
116 | 137 |
117 } // namespace appcache | 138 } // namespace appcache |
OLD | NEW |