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

Side by Side Diff: webkit/tools/test_shell/simple_appcache_system.cc

Issue 6667057: Loading from the "most appropiate" appcache. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/web_application_cache_host_impl.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tools/test_shell/simple_appcache_system.h" 5 #include "webkit/tools/test_shell/simple_appcache_system.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 if (system_->is_ui_thread()) { 192 if (system_->is_ui_thread()) {
193 system_->io_message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 193 system_->io_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
194 this, &SimpleBackendProxy::UnregisterHost, host_id)); 194 this, &SimpleBackendProxy::UnregisterHost, host_id));
195 } else if (system_->is_io_thread()) { 195 } else if (system_->is_io_thread()) {
196 system_->backend_impl_->UnregisterHost(host_id); 196 system_->backend_impl_->UnregisterHost(host_id);
197 } else { 197 } else {
198 NOTREACHED(); 198 NOTREACHED();
199 } 199 }
200 } 200 }
201 201
202 virtual void SetSpawningHostId(int host_id, int spawning_host_id) {
203 if (system_->is_ui_thread()) {
204 system_->io_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
205 this, &SimpleBackendProxy::SetSpawningHostId,
206 host_id, spawning_host_id));
207 } else if (system_->is_io_thread()) {
208 system_->backend_impl_->SetSpawningHostId(host_id, spawning_host_id);
209 } else {
210 NOTREACHED();
211 }
212 }
213
202 virtual void SelectCache(int host_id, 214 virtual void SelectCache(int host_id,
203 const GURL& document_url, 215 const GURL& document_url,
204 const int64 cache_document_was_loaded_from, 216 const int64 cache_document_was_loaded_from,
205 const GURL& manifest_url) { 217 const GURL& manifest_url) {
206 if (system_->is_ui_thread()) { 218 if (system_->is_ui_thread()) {
207 system_->io_message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 219 system_->io_message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
208 this, &SimpleBackendProxy::SelectCache, host_id, document_url, 220 this, &SimpleBackendProxy::SelectCache, host_id, document_url,
209 cache_document_was_loaded_from, manifest_url)); 221 cache_document_was_loaded_from, manifest_url));
210 } else if (system_->is_io_thread()) { 222 } else if (system_->is_io_thread()) {
211 system_->backend_impl_->SelectCache(host_id, document_url, 223 system_->backend_impl_->SelectCache(host_id, document_url,
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 458 }
447 459
448 void SimpleAppCacheSystem::GetExtraResponseBits( 460 void SimpleAppCacheSystem::GetExtraResponseBits(
449 net::URLRequest* request, int64* cache_id, GURL* manifest_url) { 461 net::URLRequest* request, int64* cache_id, GURL* manifest_url) {
450 if (is_initialized()) { 462 if (is_initialized()) {
451 DCHECK(is_io_thread()); 463 DCHECK(is_io_thread());
452 AppCacheInterceptor::GetExtraResponseInfo( 464 AppCacheInterceptor::GetExtraResponseInfo(
453 request, cache_id, manifest_url); 465 request, cache_id, manifest_url);
454 } 466 }
455 } 467 }
OLDNEW
« no previous file with comments | « webkit/appcache/web_application_cache_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698