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

Side by Side Diff: net/http/http_cache.cc

Issue 7043007: Kill URLRequestJobTracker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 9 years, 7 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 | « net/http/http_cache.h ('k') | net/http/http_network_layer.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 "net/http/http_cache.h" 5 #include "net/http/http_cache.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 HttpCache* HttpCache::GetCache() { 471 HttpCache* HttpCache::GetCache() {
472 return this; 472 return this;
473 } 473 }
474 474
475 HttpNetworkSession* HttpCache::GetSession() { 475 HttpNetworkSession* HttpCache::GetSession() {
476 net::HttpNetworkLayer* network = 476 net::HttpNetworkLayer* network =
477 static_cast<net::HttpNetworkLayer*>(network_layer_.get()); 477 static_cast<net::HttpNetworkLayer*>(network_layer_.get());
478 return network->GetSession(); 478 return network->GetSession();
479 } 479 }
480 480
481 void HttpCache::Suspend(bool suspend) {
482 network_layer_->Suspend(suspend);
483 }
484
485 //----------------------------------------------------------------------------- 481 //-----------------------------------------------------------------------------
486 482
487 int HttpCache::CreateBackend(disk_cache::Backend** backend, 483 int HttpCache::CreateBackend(disk_cache::Backend** backend,
488 CompletionCallback* callback) { 484 CompletionCallback* callback) {
489 if (!backend_factory_.get()) 485 if (!backend_factory_.get())
490 return ERR_FAILED; 486 return ERR_FAILED;
491 487
492 building_backend_ = true; 488 building_backend_ = true;
493 489
494 scoped_ptr<WorkItem> item(new WorkItem(WI_CREATE_BACKEND, NULL, callback, 490 scoped_ptr<WorkItem> item(new WorkItem(WI_CREATE_BACKEND, NULL, callback,
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 building_backend_ = false; 1129 building_backend_ = false;
1134 DeletePendingOp(pending_op); 1130 DeletePendingOp(pending_op);
1135 } 1131 }
1136 1132
1137 // The cache may be gone when we return from the callback. 1133 // The cache may be gone when we return from the callback.
1138 if (!item->DoCallback(result, backend)) 1134 if (!item->DoCallback(result, backend))
1139 item->NotifyTransaction(result, NULL); 1135 item->NotifyTransaction(result, NULL);
1140 } 1136 }
1141 1137
1142 } // namespace net 1138 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache.h ('k') | net/http/http_network_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698