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

Side by Side Diff: chrome/test/base/testing_io_thread_state.cc

Issue 2860033003: Don't delay creation of system URLRequestContext until first use (Closed)
Patch Set: Remove comment Created 3 years, 7 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 | « chrome/browser/io_thread.cc ('k') | components/proxy_config/pref_proxy_config_tracker.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/test/base/testing_io_thread_state.h" 5 #include "chrome/test/base/testing_io_thread_state.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 DCHECK_CURRENTLY_ON(BrowserThread::IO); 89 DCHECK_CURRENTLY_ON(BrowserThread::IO);
90 90
91 io_thread_state_->SetGlobalsForTesting(new IOThread::Globals()); 91 io_thread_state_->SetGlobalsForTesting(new IOThread::Globals());
92 92
93 done.Run(); 93 done.Run();
94 } 94 }
95 95
96 void TestingIOThreadState::Shutdown(const base::Closure& done) { 96 void TestingIOThreadState::Shutdown(const base::Closure& done) {
97 DCHECK_CURRENTLY_ON(BrowserThread::IO); 97 DCHECK_CURRENTLY_ON(BrowserThread::IO);
98 98
99 delete io_thread_state_->globals(); 99 io_thread_state_->CleanUp();
100 io_thread_state_->SetGlobalsForTesting(NULL);
101 done.Run(); 100 done.Run();
102 } 101 }
103 102
104 } // namespace chrome 103 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | components/proxy_config/pref_proxy_config_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698