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 "content/browser/appcache/appcache.h" | 5 #include "content/browser/appcache/appcache.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 } | 258 } |
259 | 259 |
260 // 6.6.6 Changes to the networking model | 260 // 6.6.6 Changes to the networking model |
261 | 261 |
262 AppCacheEntry* entry = GetEntry(url_no_ref); | 262 AppCacheEntry* entry = GetEntry(url_no_ref); |
263 if (entry) { | 263 if (entry) { |
264 *found_entry = *entry; | 264 *found_entry = *entry; |
265 return true; | 265 return true; |
266 } | 266 } |
267 | 267 |
268 if ((*found_network_namespace = IsInNetworkNamespace(url_no_ref))) | 268 *found_network_namespace = IsInNetworkNamespace(url_no_ref); |
| 269 if (*found_network_namespace) |
269 return true; | 270 return true; |
270 | 271 |
271 const AppCacheNamespace* intercept_namespace = | 272 const AppCacheNamespace* intercept_namespace = |
272 FindInterceptNamespace(url_no_ref); | 273 FindInterceptNamespace(url_no_ref); |
273 if (intercept_namespace) { | 274 if (intercept_namespace) { |
274 entry = GetEntry(intercept_namespace->target_url); | 275 entry = GetEntry(intercept_namespace->target_url); |
275 DCHECK(entry); | 276 DCHECK(entry); |
276 *found_entry = *entry; | 277 *found_entry = *entry; |
277 *found_intercept_namespace = intercept_namespace->namespace_url; | 278 *found_intercept_namespace = intercept_namespace->namespace_url; |
278 return true; | 279 return true; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 const GURL& url) { | 318 const GURL& url) { |
318 size_t count = namespaces.size(); | 319 size_t count = namespaces.size(); |
319 for (size_t i = 0; i < count; ++i) { | 320 for (size_t i = 0; i < count; ++i) { |
320 if (namespaces[i].IsMatch(url)) | 321 if (namespaces[i].IsMatch(url)) |
321 return &namespaces[i]; | 322 return &namespaces[i]; |
322 } | 323 } |
323 return NULL; | 324 return NULL; |
324 } | 325 } |
325 | 326 |
326 } // namespace content | 327 } // namespace content |
OLD | NEW |