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

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

Issue 2501343003: PlzNavigate: AppCache support. (Closed)
Patch Set: Rebase to tip correctly Created 4 years 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
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 "content/browser/appcache/appcache_backend_impl.h" 5 #include "content/browser/appcache/appcache_backend_impl.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "content/browser/appcache/appcache.h" 8 #include "content/browser/appcache/appcache.h"
9 #include "content/browser/appcache/appcache_group.h" 9 #include "content/browser/appcache/appcache_group.h"
10 #include "content/browser/appcache/appcache_service_impl.h" 10 #include "content/browser/appcache/appcache_service_impl.h"
11 #include "content/public/common/browser_side_navigation_policy.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 AppCacheBackendImpl::AppCacheBackendImpl() 15 AppCacheBackendImpl::AppCacheBackendImpl()
15 : service_(NULL), 16 : service_(NULL),
16 frontend_(NULL), 17 frontend_(NULL),
17 process_id_(0) { 18 process_id_(0) {
18 } 19 }
19 20
20 AppCacheBackendImpl::~AppCacheBackendImpl() { 21 AppCacheBackendImpl::~AppCacheBackendImpl() {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 auto found = hosts_.find(new_host_id); 160 auto found = hosts_.find(new_host_id);
160 if (found == hosts_.end()) { 161 if (found == hosts_.end()) {
161 NOTREACHED(); 162 NOTREACHED();
162 return; 163 return;
163 } 164 }
164 165
165 host->CompleteTransfer(new_host_id, frontend_); 166 host->CompleteTransfer(new_host_id, frontend_);
166 found->second = std::move(host); 167 found->second = std::move(host);
167 } 168 }
168 169
170 void AppCacheBackendImpl::RegisterPrecreatedHost(
171 std::unique_ptr<AppCacheHost> host) {
172 DCHECK(IsBrowserSideNavigationEnabled());
173 DCHECK(host.get());
174 DCHECK(hosts_.find(host->host_id()) == hosts_.end());
175
176 hosts_[host->host_id()] = std::move(host);
michaeln 2016/12/03 00:58:58 yup, i'd vote to put the 'pending_host_ids_' colle
ananta 2016/12/03 14:55:04 Done.
177 }
178
169 } // namespace content 179 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698