Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(549)

Side by Side Diff: webkit/appcache/appcache_request_handler.cc

Issue 192043: AppCacheHost cache selection algorithm (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_request_handler.h ('k') | webkit/appcache/appcache_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/appcache/appcache_request_handler.h"
6
7 #include "net/url_request/url_request.h"
8 #include "net/url_request/url_request_job.h"
9 #include "webkit/appcache/appcache.h"
10
11 namespace appcache {
12
13 // AppCacheRequestHandler -----------------------------------------------------
14
15 static bool IsHttpOrHttpsGetOrEquivalent(URLRequest* request) {
16 return false; // TODO(michaeln): write me
17 }
18
19 AppCacheRequestHandler::AppCacheRequestHandler(AppCacheHost* host)
20 : is_main_request_(true), cache_id_(kNoCacheId),
21 host_(host->AsWeakPtr()), service_(host->service()) {
22 }
23
24 AppCacheRequestHandler::AppCacheRequestHandler(AppCache* cache)
25 : is_main_request_(false), cache_id_(kNoCacheId),
26 cache_(cache), service_(cache->service()) {
27 }
28
29 void AppCacheRequestHandler::GetExtraResponseInfo(
30 int64* cache_id, GURL* manifest_url) {
31 // TODO(michaeln): If this is a main request and it was retrieved from
32 // an appcache, ensure that appcache survives the frame navigation. The
33 // AppCacheHost should hold reference to that cache to prevent it from
34 // being dropped from the in-memory collection of AppCaches. When cache
35 // selection occurs, that extra reference should be dropped. Perhaps
36 // maybe: if (is_main) host->LoadCacheOfMainResource(cache_id);
37 }
38
39 URLRequestJob* AppCacheRequestHandler::MaybeLoadResource(URLRequest* request) {
40 if (!IsHttpOrHttpsGetOrEquivalent(request))
41 return NULL;
42 // TODO(michaeln): write me
43 return NULL;
44 }
45
46 URLRequestJob* AppCacheRequestHandler::MaybeLoadFallbackForRedirect(
47 URLRequest* request, const GURL& location) {
48 if (!IsHttpOrHttpsGetOrEquivalent(request))
49 return NULL;
50 // TODO(michaeln): write me
51 return NULL;
52 }
53
54 URLRequestJob* AppCacheRequestHandler::MaybeLoadFallbackForResponse(
55 URLRequest* request) {
56 if (!IsHttpOrHttpsGetOrEquivalent(request))
57 return NULL;
58 // TODO(michaeln): write me
59 return NULL;
60 }
61
62 } // namespace appcache
63
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_request_handler.h ('k') | webkit/appcache/appcache_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698