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

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

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_network_layer.h » ('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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 Context() : result(net::ERR_IO_PENDING) {} 489 Context() : result(net::ERR_IO_PENDING) {}
490 490
491 int result; 491 int result;
492 net::TestCompletionCallback callback; 492 net::TestCompletionCallback callback;
493 scoped_ptr<net::HttpTransaction> trans; 493 scoped_ptr<net::HttpTransaction> trans;
494 }; 494 };
495 495
496 class FakeWebSocketHandshakeStreamCreateHelper 496 class FakeWebSocketHandshakeStreamCreateHelper
497 : public net::WebSocketHandshakeStreamBase::CreateHelper { 497 : public net::WebSocketHandshakeStreamBase::CreateHelper {
498 public: 498 public:
499 virtual ~FakeWebSocketHandshakeStreamCreateHelper() {} 499 ~FakeWebSocketHandshakeStreamCreateHelper() override {}
500 virtual net::WebSocketHandshakeStreamBase* CreateBasicStream( 500 net::WebSocketHandshakeStreamBase* CreateBasicStream(
501 scoped_ptr<net::ClientSocketHandle> connect, bool using_proxy) override { 501 scoped_ptr<net::ClientSocketHandle> connect,
502 bool using_proxy) override {
502 return NULL; 503 return NULL;
503 } 504 }
504 virtual net::WebSocketHandshakeStreamBase* CreateSpdyStream( 505 net::WebSocketHandshakeStreamBase* CreateSpdyStream(
505 const base::WeakPtr<net::SpdySession>& session, 506 const base::WeakPtr<net::SpdySession>& session,
506 bool use_relative_url) override { 507 bool use_relative_url) override {
507 return NULL; 508 return NULL;
508 } 509 }
509 }; 510 };
510 511
511 // Returns true if |entry| is not one of the log types paid attention to in this 512 // Returns true if |entry| is not one of the log types paid attention to in this
512 // test. Note that TYPE_HTTP_CACHE_WRITE_INFO and TYPE_HTTP_CACHE_*_DATA are 513 // test. Note that TYPE_HTTP_CACHE_WRITE_INFO and TYPE_HTTP_CACHE_*_DATA are
513 // ignored. 514 // ignored.
514 bool ShouldIgnoreLogEntry(const net::CapturingNetLog::CapturedEntry& entry) { 515 bool ShouldIgnoreLogEntry(const net::CapturingNetLog::CapturedEntry& entry) {
(...skipping 6813 matching lines...) Expand 10 before | Expand all | Expand 10 after
7328 7329
7329 // Here the second transaction proceeds without reading the first body. 7330 // Here the second transaction proceeds without reading the first body.
7330 EXPECT_EQ(net::LOAD_STATE_WAITING_FOR_CACHE, second->trans->GetLoadState()); 7331 EXPECT_EQ(net::LOAD_STATE_WAITING_FOR_CACHE, second->trans->GetLoadState());
7331 base::MessageLoop::current()->RunUntilIdle(); 7332 base::MessageLoop::current()->RunUntilIdle();
7332 EXPECT_EQ(net::LOAD_STATE_IDLE, second->trans->GetLoadState()); 7333 EXPECT_EQ(net::LOAD_STATE_IDLE, second->trans->GetLoadState());
7333 ASSERT_TRUE(second->trans->GetResponseInfo()); 7334 ASSERT_TRUE(second->trans->GetResponseInfo());
7334 EXPECT_TRUE(second->trans->GetResponseInfo()->headers->HasHeaderValue( 7335 EXPECT_TRUE(second->trans->GetResponseInfo()->headers->HasHeaderValue(
7335 "Cache-Control", "no-store")); 7336 "Cache-Control", "no-store"));
7336 ReadAndVerifyTransaction(second->trans.get(), kSimpleGET_Transaction); 7337 ReadAndVerifyTransaction(second->trans.get(), kSimpleGET_Transaction);
7337 } 7338 }
OLDNEW
« no previous file with comments | « net/http/http_cache_transaction.h ('k') | net/http/http_network_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698