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

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

Issue 2945002: Disk cache: Switch the disk cache to use the cache_thread.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « net/disk_cache/stress_cache.cc ('k') | net/http/http_cache_unittest.cc » ('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) 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 "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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 // Anything after a Doom has to be restarted. 895 // Anything after a Doom has to be restarted.
896 fail_requests = true; 896 fail_requests = true;
897 } else if (item->IsValid()) { 897 } else if (item->IsValid()) {
898 key = pending_op->disk_entry->GetKey(); 898 key = pending_op->disk_entry->GetKey();
899 entry = ActivateEntry(key, pending_op->disk_entry); 899 entry = ActivateEntry(key, pending_op->disk_entry);
900 } else { 900 } else {
901 // The writer transaction is gone. 901 // The writer transaction is gone.
902 if (op == WI_CREATE_ENTRY) 902 if (op == WI_CREATE_ENTRY)
903 pending_op->disk_entry->Doom(); 903 pending_op->disk_entry->Doom();
904 pending_op->disk_entry->Close(); 904 pending_op->disk_entry->Close();
905 pending_op->disk_entry = NULL;
905 fail_requests = true; 906 fail_requests = true;
906 } 907 }
907 } 908 }
908 909
909 // We are about to notify a bunch of transactions, and they may decide to 910 // We are about to notify a bunch of transactions, and they may decide to
910 // re-issue a request (or send a different one). If we don't delete 911 // re-issue a request (or send a different one). If we don't delete
911 // pending_op, the new request will be appended to the end of the list, and 912 // pending_op, the new request will be appended to the end of the list, and
912 // we'll see it again from this point before it has a chance to complete (and 913 // we'll see it again from this point before it has a chance to complete (and
913 // we'll be messing out the request order). The down side is that if for some 914 // we'll be messing out the request order). The down side is that if for some
914 // reason notifying request A ends up cancelling request B (for the same key), 915 // reason notifying request A ends up cancelling request B (for the same key),
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 // This could be an external caller or a transaction waiting on Start(). 988 // This could be an external caller or a transaction waiting on Start().
988 pending_item->DoCallback(result, temp_backend_); 989 pending_item->DoCallback(result, temp_backend_);
989 pending_item->NotifyTransaction(result, NULL); 990 pending_item->NotifyTransaction(result, NULL);
990 } 991 }
991 992
992 DeletePendingOp(pending_op); 993 DeletePendingOp(pending_op);
993 building_backend_ = false; 994 building_backend_ = false;
994 } 995 }
995 996
996 } // namespace net 997 } // namespace net
OLDNEW
« no previous file with comments | « net/disk_cache/stress_cache.cc ('k') | net/http/http_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698