| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 old_factory_(NULL), | 529 old_factory_(NULL), |
| 530 resource_type_(ResourceType::SUB_RESOURCE), | 530 resource_type_(ResourceType::SUB_RESOURCE), |
| 531 send_data_received_acks_(false) { | 531 send_data_received_acks_(false) { |
| 532 browser_context_.reset(new TestBrowserContext()); | 532 browser_context_.reset(new TestBrowserContext()); |
| 533 BrowserContext::EnsureResourceContextInitialized(browser_context_.get()); | 533 BrowserContext::EnsureResourceContextInitialized(browser_context_.get()); |
| 534 message_loop_.RunUntilIdle(); | 534 message_loop_.RunUntilIdle(); |
| 535 filter_ = new ForwardingFilter( | 535 filter_ = new ForwardingFilter( |
| 536 this, browser_context_->GetResourceContext()); | 536 this, browser_context_->GetResourceContext()); |
| 537 } | 537 } |
| 538 | 538 |
| 539 ~ResourceDispatcherHostTest() { | 539 virtual ~ResourceDispatcherHostTest() { |
| 540 for (std::set<int>::iterator it = child_ids_.begin(); | 540 for (std::set<int>::iterator it = child_ids_.begin(); |
| 541 it != child_ids_.end(); ++it) { | 541 it != child_ids_.end(); ++it) { |
| 542 host_.CancelRequestsForProcess(*it); | 542 host_.CancelRequestsForProcess(*it); |
| 543 } | 543 } |
| 544 } | 544 } |
| 545 | 545 |
| 546 // IPC::Sender implementation | 546 // IPC::Sender implementation |
| 547 virtual bool Send(IPC::Message* msg) OVERRIDE { | 547 virtual bool Send(IPC::Message* msg) OVERRIDE { |
| 548 accum_.AddMessage(*msg); | 548 accum_.AddMessage(*msg); |
| 549 | 549 |
| (...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1969 } | 1969 } |
| 1970 | 1970 |
| 1971 MessageLoop::current()->RunUntilIdle(); | 1971 MessageLoop::current()->RunUntilIdle(); |
| 1972 | 1972 |
| 1973 msgs.clear(); | 1973 msgs.clear(); |
| 1974 accum_.GetClassifiedMessages(&msgs); | 1974 accum_.GetClassifiedMessages(&msgs); |
| 1975 } | 1975 } |
| 1976 } | 1976 } |
| 1977 | 1977 |
| 1978 } // namespace content | 1978 } // namespace content |
| OLD | NEW |