OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/url_response_disk_cache/url_response_disk_cache_impl.h" | 5 #include "services/url_response_disk_cache/url_response_disk_cache_impl.h" |
6 | 6 |
7 #include <dirent.h> | 7 #include <dirent.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
11 #include <type_traits> | 11 #include <type_traits> |
12 | 12 |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/callback_helpers.h" | 14 #include "base/callback_helpers.h" |
15 #include "base/files/file.h" | 15 #include "base/files/file.h" |
16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
17 #include "base/location.h" | 17 #include "base/location.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
21 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
22 #include "base/trace_event/trace_event.h" | 22 #include "base/trace_event/trace_event.h" |
23 #include "crypto/random.h" | 23 #include "crypto/random.h" |
24 #include "mojo/data_pipe_utils/data_pipe_utils.h" | 24 #include "mojo/data_pipe_utils/data_pipe_utils.h" |
25 #include "mojo/public/cpp/application/application_connection.h" | |
26 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h" | 25 #include "mojo/public/cpp/bindings/lib/fixed_buffer.h" |
27 #include "mojo/public/interfaces/network/http_header.mojom.h" | 26 #include "mojo/public/interfaces/network/http_header.mojom.h" |
28 #include "services/url_response_disk_cache/url_response_disk_cache_entry.mojom.h
" | 27 #include "services/url_response_disk_cache/url_response_disk_cache_entry.mojom.h
" |
29 #include "third_party/zlib/google/zip_reader.h" | 28 #include "third_party/zlib/google/zip_reader.h" |
30 #include "url/gurl.h" | 29 #include "url/gurl.h" |
31 | 30 |
32 namespace mojo { | 31 namespace mojo { |
33 | 32 |
34 namespace { | 33 namespace { |
35 | 34 |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 return; | 517 return; |
519 } | 518 } |
520 } | 519 } |
521 // We can ignore write error, as it will just force to clear the cache on the | 520 // We can ignore write error, as it will just force to clear the cache on the |
522 // next request. | 521 // next request. |
523 WriteFile(GetExtractionSentinel(entry_directory), nullptr, 0); | 522 WriteFile(GetExtractionSentinel(entry_directory), nullptr, 0); |
524 callback.Run(extraction_directory, consumer_cache_directory); | 523 callback.Run(extraction_directory, consumer_cache_directory); |
525 } | 524 } |
526 | 525 |
527 } // namespace mojo | 526 } // namespace mojo |
OLD | NEW |