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

Side by Side Diff: content/browser/appcache/appcache_backend_impl.cc

Issue 344493002: Move all remaining appcache-related code to content namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
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/browser/appcache/appcache_backend_impl.h" 5 #include "content/browser/appcache/appcache_backend_impl.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "webkit/browser/appcache/appcache.h" 8 #include "content/browser/appcache/appcache.h"
9 #include "webkit/browser/appcache/appcache_group.h" 9 #include "content/browser/appcache/appcache_group.h"
10 #include "webkit/browser/appcache/appcache_service_impl.h" 10 #include "content/browser/appcache/appcache_service_impl.h"
11 11
12 namespace appcache { 12 namespace content {
13 13
14 AppCacheBackendImpl::AppCacheBackendImpl() 14 AppCacheBackendImpl::AppCacheBackendImpl()
15 : service_(NULL), 15 : service_(NULL),
16 frontend_(NULL), 16 frontend_(NULL),
17 process_id_(0) { 17 process_id_(0) {
18 } 18 }
19 19
20 AppCacheBackendImpl::~AppCacheBackendImpl() { 20 AppCacheBackendImpl::~AppCacheBackendImpl() {
21 STLDeleteValues(&hosts_); 21 STLDeleteValues(&hosts_);
22 if (service_) 22 if (service_)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 int host_id, const SwapCacheCallback& callback, void* callback_param) { 132 int host_id, const SwapCacheCallback& callback, void* callback_param) {
133 AppCacheHost* host = GetHost(host_id); 133 AppCacheHost* host = GetHost(host_id);
134 if (!host) 134 if (!host)
135 return false; 135 return false;
136 136
137 host->SwapCacheWithCallback(callback, callback_param); 137 host->SwapCacheWithCallback(callback, callback_param);
138 return true; 138 return true;
139 } 139 }
140 140
141 void AppCacheBackendImpl::GetResourceList( 141 void AppCacheBackendImpl::GetResourceList(
142 int host_id, std::vector<appcache::AppCacheResourceInfo>* resource_infos) { 142 int host_id, std::vector<AppCacheResourceInfo>* resource_infos) {
143 AppCacheHost* host = GetHost(host_id); 143 AppCacheHost* host = GetHost(host_id);
144 if (!host) 144 if (!host)
145 return; 145 return;
146 146
147 host->GetResourceList(resource_infos); 147 host->GetResourceList(resource_infos);
148 } 148 }
149 149
150 scoped_ptr<AppCacheHost> AppCacheBackendImpl::TransferHostOut(int host_id) { 150 scoped_ptr<AppCacheHost> AppCacheBackendImpl::TransferHostOut(int host_id) {
151 HostMap::iterator found = hosts_.find(host_id); 151 HostMap::iterator found = hosts_.find(host_id);
152 if (found == hosts_.end()) { 152 if (found == hosts_.end()) {
(...skipping 19 matching lines...) Expand all
172 return; 172 return;
173 } 173 }
174 174
175 delete found->second; 175 delete found->second;
176 176
177 // We take onwership. 177 // We take onwership.
178 host->CompleteTransfer(new_host_id, frontend_); 178 host->CompleteTransfer(new_host_id, frontend_);
179 found->second = host.release(); 179 found->second = host.release();
180 } 180 }
181 181
182 } // namespace appcache 182 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698