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

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

Issue 9949011: Make FileStream::Seek async and add FileStream::SeekSync for sync operation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 8 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/entry_unittest.cc ('k') | net/url_request/url_request_file_job.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) 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 15 matching lines...) Expand all
26 #include "net/http/http_transaction.h" 26 #include "net/http/http_transaction.h"
27 #include "net/http/http_transaction_unittest.h" 27 #include "net/http/http_transaction_unittest.h"
28 #include "net/http/http_util.h" 28 #include "net/http/http_util.h"
29 #include "net/http/mock_http_cache.h" 29 #include "net/http/mock_http_cache.h"
30 #include "testing/gtest/include/gtest/gtest.h" 30 #include "testing/gtest/include/gtest/gtest.h"
31 31
32 using base::Time; 32 using base::Time;
33 33
34 namespace { 34 namespace {
35 35
36 class DeleteCacheCompletionCallback : public TestCompletionCallbackBase { 36 class DeleteCacheCompletionCallback : public net::TestCompletionCallbackBase {
37 public: 37 public:
38 explicit DeleteCacheCompletionCallback(MockHttpCache* cache) 38 explicit DeleteCacheCompletionCallback(MockHttpCache* cache)
39 : cache_(cache), 39 : cache_(cache),
40 ALLOW_THIS_IN_INITIALIZER_LIST(callback_( 40 ALLOW_THIS_IN_INITIALIZER_LIST(callback_(
41 base::Bind(&DeleteCacheCompletionCallback::OnComplete, 41 base::Bind(&DeleteCacheCompletionCallback::OnComplete,
42 base::Unretained(this)))) { 42 base::Unretained(this)))) {
43 } 43 }
44 44
45 const net::CompletionCallback& callback() const { return callback_; } 45 const net::CompletionCallback& callback() const { return callback_; }
46 46
(...skipping 4768 matching lines...) Expand 10 before | Expand all | Expand 10 after
4815 4815
4816 // Verify that the entry is marked as incomplete. 4816 // Verify that the entry is marked as incomplete.
4817 disk_cache::Entry* entry; 4817 disk_cache::Entry* entry;
4818 ASSERT_TRUE(cache.OpenBackendEntry(kSimpleGET_Transaction.url, &entry)); 4818 ASSERT_TRUE(cache.OpenBackendEntry(kSimpleGET_Transaction.url, &entry));
4819 net::HttpResponseInfo response; 4819 net::HttpResponseInfo response;
4820 bool truncated = false; 4820 bool truncated = false;
4821 EXPECT_TRUE(MockHttpCache::ReadResponseInfo(entry, &response, &truncated)); 4821 EXPECT_TRUE(MockHttpCache::ReadResponseInfo(entry, &response, &truncated));
4822 EXPECT_TRUE(truncated); 4822 EXPECT_TRUE(truncated);
4823 entry->Close(); 4823 entry->Close();
4824 } 4824 }
OLDNEW
« no previous file with comments | « net/disk_cache/entry_unittest.cc ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698