OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 27 matching lines...) Expand all Loading... |
38 #include "net/http/http_network_session.h" | 38 #include "net/http/http_network_session.h" |
39 #include "net/http/http_request_info.h" | 39 #include "net/http/http_request_info.h" |
40 #include "net/http/http_response_headers.h" | 40 #include "net/http/http_response_headers.h" |
41 #include "net/http/http_response_info.h" | 41 #include "net/http/http_response_info.h" |
42 #include "net/http/http_util.h" | 42 #include "net/http/http_util.h" |
43 | 43 |
44 namespace { | 44 namespace { |
45 | 45 |
46 // Adaptor to delete a file on a worker thread. | 46 // Adaptor to delete a file on a worker thread. |
47 void DeletePath(base::FilePath path) { | 47 void DeletePath(base::FilePath path) { |
48 base::Delete(path, false); | 48 base::DeleteFile(path, false); |
49 } | 49 } |
50 | 50 |
51 } // namespace | 51 } // namespace |
52 | 52 |
53 namespace net { | 53 namespace net { |
54 | 54 |
55 HttpCache::DefaultBackend::DefaultBackend(CacheType type, | 55 HttpCache::DefaultBackend::DefaultBackend(CacheType type, |
56 BackendType backend_type, | 56 BackendType backend_type, |
57 const base::FilePath& path, | 57 const base::FilePath& path, |
58 int max_bytes, | 58 int max_bytes, |
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 building_backend_ = false; | 1139 building_backend_ = false; |
1140 DeletePendingOp(pending_op); | 1140 DeletePendingOp(pending_op); |
1141 } | 1141 } |
1142 | 1142 |
1143 // The cache may be gone when we return from the callback. | 1143 // The cache may be gone when we return from the callback. |
1144 if (!item->DoCallback(result, backend)) | 1144 if (!item->DoCallback(result, backend)) |
1145 item->NotifyTransaction(result, NULL); | 1145 item->NotifyTransaction(result, NULL); |
1146 } | 1146 } |
1147 | 1147 |
1148 } // namespace net | 1148 } // namespace net |
OLD | NEW |