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

Side by Side Diff: content/browser/appcache/appcache_host.h

Issue 2501343003: PlzNavigate: AppCache support. (Closed)
Patch Set: Address review comments 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 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // work properly, this method needs to by invoked prior to cache selection. 156 // work properly, this method needs to by invoked prior to cache selection.
157 void NotifyMainResourceBlocked(const GURL& manifest_url); 157 void NotifyMainResourceBlocked(const GURL& manifest_url);
158 158
159 // Used by the update job to keep track of which hosts are associated 159 // Used by the update job to keep track of which hosts are associated
160 // with which pending master entries. 160 // with which pending master entries.
161 const GURL& pending_master_entry_url() const { 161 const GURL& pending_master_entry_url() const {
162 return new_master_entry_url_; 162 return new_master_entry_url_;
163 } 163 }
164 164
165 int host_id() const { return host_id_; } 165 int host_id() const { return host_id_; }
166
166 AppCacheServiceImpl* service() const { return service_; } 167 AppCacheServiceImpl* service() const { return service_; }
167 AppCacheStorage* storage() const { return storage_; } 168 AppCacheStorage* storage() const { return storage_; }
168 AppCacheFrontend* frontend() const { return frontend_; } 169 AppCacheFrontend* frontend() const { return frontend_; }
170
171 // PlzNavigate:
172 // The AppCacheHost instance is created with a dummy AppCacheFrontend
173 // pointer when the navigation starts. We need to switch it to the
174 // actual frontend when the navigation commits.
175 void set_frontend(AppCacheFrontend* frontend) { frontend_ = frontend; }
176
169 AppCache* associated_cache() const { return associated_cache_.get(); } 177 AppCache* associated_cache() const { return associated_cache_.get(); }
170 178
171 void enable_cache_selection(bool enable) { 179 void enable_cache_selection(bool enable) {
172 is_cache_selection_enabled_ = enable; 180 is_cache_selection_enabled_ = enable;
173 } 181 }
174 182
175 bool is_selection_pending() const { 183 bool is_selection_pending() const {
176 return pending_selected_cache_id_ != kAppCacheNoCacheId || 184 return pending_selected_cache_id_ != kAppCacheNoCacheId ||
177 !pending_selected_manifest_url_.is_empty(); 185 !pending_selected_manifest_url_.is_empty();
178 } 186 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheBlocked); 349 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheBlocked);
342 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheTwice); 350 FRIEND_TEST_ALL_PREFIXES(content::AppCacheHostTest, SelectCacheTwice);
343 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, CleanupUnusedCache); 351 FRIEND_TEST_ALL_PREFIXES(content::AppCacheTest, CleanupUnusedCache);
344 352
345 DISALLOW_COPY_AND_ASSIGN(AppCacheHost); 353 DISALLOW_COPY_AND_ASSIGN(AppCacheHost);
346 }; 354 };
347 355
348 } // namespace content 356 } // namespace content
349 357
350 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_ 358 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/appcache/appcache_dispatcher_host.cc ('k') | content/browser/appcache/appcache_interceptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698