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

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

Issue 8343018: More groundwork for flat file based response storage. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « content/common/appcache_messages.h ('k') | webkit/appcache/appcache_interfaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_host.h" 5 #include "webkit/appcache/appcache_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "webkit/appcache/appcache.h" 10 #include "webkit/appcache/appcache.h"
11 #include "webkit/appcache/appcache_backend_impl.h" 11 #include "webkit/appcache/appcache_backend_impl.h"
12 #include "webkit/appcache/appcache_policy.h" 12 #include "webkit/appcache/appcache_policy.h"
13 #include "webkit/appcache/appcache_request_handler.h" 13 #include "webkit/appcache/appcache_request_handler.h"
14 #include "webkit/quota/quota_manager.h" 14 #include "webkit/quota/quota_manager.h"
15 15
16 namespace appcache { 16 namespace appcache {
17 17
18 namespace { 18 namespace {
19 19
20 void FillCacheInfo( 20 void FillCacheInfo(
21 const AppCache* cache, Status status, AppCacheInfo* info) { 21 const AppCache* cache, Status status, AppCacheInfo* info) {
22 DCHECK(cache); 22 DCHECK(cache);
23 info->cache_id = cache->cache_id(); 23 info->cache_id = cache->cache_id();
24 info->status = status; 24 info->status = status;
25 info->is_complete = cache->is_complete(); 25 info->is_complete = cache->is_complete();
26 if (info->is_complete) { 26 if (info->is_complete) {
27 DCHECK(cache->owning_group());
27 info->manifest_url = cache->owning_group()->manifest_url(); 28 info->manifest_url = cache->owning_group()->manifest_url();
29 info->group_id = cache->owning_group()->group_id();
28 info->last_update_time = cache->update_time(); 30 info->last_update_time = cache->update_time();
29 info->creation_time = cache->owning_group()->creation_time(); 31 info->creation_time = cache->owning_group()->creation_time();
30 info->size = cache->cache_size(); 32 info->size = cache->cache_size();
31 } 33 }
32 } 34 }
33 35
34 } // Anonymous namespace 36 } // Anonymous namespace
35 37
36 AppCacheHost::AppCacheHost(int host_id, AppCacheFrontend* frontend, 38 AppCacheHost::AppCacheHost(int host_id, AppCacheFrontend* frontend,
37 AppCacheService* service) 39 AppCacheService* service)
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 associated_cache_info_pending_ = cache && !cache->is_complete(); 476 associated_cache_info_pending_ = cache && !cache->is_complete();
475 AppCacheInfo info; 477 AppCacheInfo info;
476 if (cache) { 478 if (cache) {
477 cache->AssociateHost(this); 479 cache->AssociateHost(this);
478 FillCacheInfo(cache, GetStatus(), &info); 480 FillCacheInfo(cache, GetStatus(), &info);
479 } 481 }
480 frontend_->OnCacheSelected(host_id_, info); 482 frontend_->OnCacheSelected(host_id_, info);
481 } 483 }
482 484
483 } // namespace appcache 485 } // namespace appcache
OLDNEW
« no previous file with comments | « content/common/appcache_messages.h ('k') | webkit/appcache/appcache_interfaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698