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

Unified Diff: chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc

Issue 2536723009: Make net::URLRequestContext a MemoryDumpProvider (Closed)
Patch Set: fix compile Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc
diff --git a/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc b/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc
index 5b69a376efc1094f22b61cbc510285438fb5ce0d..acdb5a5a85928c7eb9de8d7c727e6a89655e9ba6 100644
--- a/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc
+++ b/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc
@@ -301,19 +301,21 @@ class TestExpectCTNetworkDelegate : public net::NetworkDelegateImpl {
class ChromeExpectCTReporterWaitTest : public ::testing::Test {
public:
ChromeExpectCTReporterWaitTest()
- : context_(true),
- thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {
- context_.set_network_delegate(&network_delegate_);
- context_.Init();
+ : thread_bundle_(content::TestBrowserThreadBundle::IO_MAINLOOP) {}
+
+ void SetUp() override {
+ // Initializes URLRequestContext after the thread is set up.
+ context_.reset(new net::TestURLRequestContext(true));
+ context_->set_network_delegate(&network_delegate_);
+ context_->Init();
+ net::URLRequestFailedJob::AddUrlHandler();
}
- void SetUp() override { net::URLRequestFailedJob::AddUrlHandler(); }
-
void TearDown() override {
net::URLRequestFilter::GetInstance()->ClearHandlers();
}
- net::TestURLRequestContext* context() { return &context_; }
+ net::TestURLRequestContext* context() { return context_.get(); }
protected:
void SendReport(ChromeExpectCTReporter* reporter,
@@ -329,7 +331,7 @@ class ChromeExpectCTReporterWaitTest : public ::testing::Test {
private:
TestExpectCTNetworkDelegate network_delegate_;
- net::TestURLRequestContext context_;
+ std::unique_ptr<net::TestURLRequestContext> context_;
content::TestBrowserThreadBundle thread_bundle_;
DISALLOW_COPY_AND_ASSIGN(ChromeExpectCTReporterWaitTest);
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | content/browser/appcache/appcache_request_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698