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

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

Issue 11632002: Use generated shim headers for zlib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years 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
OLDNEW
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/infinite_cache.h" 5 #include "net/http/infinite_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 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 10 matching lines...) Expand all
21 #include "base/rand_util.h" 21 #include "base/rand_util.h"
22 #include "base/sha1.h" 22 #include "base/sha1.h"
23 #include "base/time.h" 23 #include "base/time.h"
24 #include "base/threading/sequenced_worker_pool.h" 24 #include "base/threading/sequenced_worker_pool.h"
25 #include "net/base/net_errors.h" 25 #include "net/base/net_errors.h"
26 #include "net/http/http_cache_transaction.h" 26 #include "net/http/http_cache_transaction.h"
27 #include "net/http/http_request_info.h" 27 #include "net/http/http_request_info.h"
28 #include "net/http/http_response_headers.h" 28 #include "net/http/http_response_headers.h"
29 #include "net/http/http_response_info.h" 29 #include "net/http/http_response_info.h"
30 #include "net/http/http_util.h" 30 #include "net/http/http_util.h"
31
32 #if defined(USE_SYSTEM_ZLIB)
33 #include <zlib.h>
34 #else
35 #include "third_party/zlib/zlib.h" 31 #include "third_party/zlib/zlib.h"
36 #endif
37 32
38 using base::PlatformFile; 33 using base::PlatformFile;
39 using base::Time; 34 using base::Time;
40 using base::TimeDelta; 35 using base::TimeDelta;
41 36
42 namespace { 37 namespace {
43 38
44 // Flags to use with a particular resource. 39 // Flags to use with a particular resource.
45 enum Flags { 40 enum Flags {
46 NO_CACHE = 1 << 0, 41 NO_CACHE = 1 << 0,
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 int InfiniteCache::FlushDataForTest(const CompletionCallback& callback) { 1159 int InfiniteCache::FlushDataForTest(const CompletionCallback& callback) {
1165 DCHECK(worker_); 1160 DCHECK(worker_);
1166 int* result = new int; 1161 int* result = new int;
1167 task_runner_->PostTaskAndReply( 1162 task_runner_->PostTaskAndReply(
1168 FROM_HERE, base::Bind(&InfiniteCache::Worker::Flush, worker_, result), 1163 FROM_HERE, base::Bind(&InfiniteCache::Worker::Flush, worker_, result),
1169 base::Bind(&OnComplete, callback, base::Owned(result))); 1164 base::Bind(&OnComplete, callback, base::Owned(result)));
1170 return net::ERR_IO_PENDING; 1165 return net::ERR_IO_PENDING;
1171 } 1166 }
1172 1167
1173 } // namespace net 1168 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698