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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 1546001: Split GpuProcessHost into GpuProcessHostUIShim, which runs on the UI... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/leak_tracker.h" 7 #include "base/leak_tracker.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_thread.h" 10 #include "chrome/browser/chrome_thread.h"
11 #include "chrome/browser/gpu_process_host.h"
11 #include "chrome/browser/net/chrome_net_log.h" 12 #include "chrome/browser/net/chrome_net_log.h"
12 #include "chrome/browser/net/dns_global.h" 13 #include "chrome/browser/net/dns_global.h"
13 #include "chrome/browser/net/passive_log_collector.h" 14 #include "chrome/browser/net/passive_log_collector.h"
14 #include "chrome/browser/net/url_fetcher.h" 15 #include "chrome/browser/net/url_fetcher.h"
15 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
16 #include "net/base/mapped_host_resolver.h" 17 #include "net/base/mapped_host_resolver.h"
17 #include "net/base/host_cache.h" 18 #include "net/base/host_cache.h"
18 #include "net/base/host_resolver.h" 19 #include "net/base/host_resolver.h"
19 #include "net/base/host_resolver_impl.h" 20 #include "net/base/host_resolver_impl.h"
20 #include "net/base/net_util.h" 21 #include "net/base/net_util.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 globals_->host_resolver->RemoveObserver(prefetch_observer_); 163 globals_->host_resolver->RemoveObserver(prefetch_observer_);
163 delete prefetch_observer_; 164 delete prefetch_observer_;
164 prefetch_observer_ = NULL; 165 prefetch_observer_ = NULL;
165 } 166 }
166 167
167 // TODO(eroman): hack for http://crbug.com/15513 168 // TODO(eroman): hack for http://crbug.com/15513
168 if (globals_->host_resolver->GetAsHostResolverImpl()) { 169 if (globals_->host_resolver->GetAsHostResolverImpl()) {
169 globals_->host_resolver.get()->GetAsHostResolverImpl()->Shutdown(); 170 globals_->host_resolver.get()->GetAsHostResolverImpl()->Shutdown();
170 } 171 }
171 172
173 GpuProcessHost::Shutdown();
174
172 delete globals_; 175 delete globals_;
173 globals_ = NULL; 176 globals_ = NULL;
174 177
175 // URLFetcher and URLRequest instances must NOT outlive the IO thread. 178 // URLFetcher and URLRequest instances must NOT outlive the IO thread.
176 // 179 //
177 // Strictly speaking, URLFetcher's CheckForLeaks() should be done on the 180 // Strictly speaking, URLFetcher's CheckForLeaks() should be done on the
178 // UI thread. However, since there _shouldn't_ be any instances left 181 // UI thread. However, since there _shouldn't_ be any instances left
179 // at this point, it shouldn't be a race. 182 // at this point, it shouldn't be a race.
180 // 183 //
181 // We check URLFetcher first, since if it has leaked then an associated 184 // We check URLFetcher first, since if it has leaked then an associated
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 net::HostCache* host_cache = 257 net::HostCache* host_cache =
255 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); 258 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache();
256 if (host_cache) 259 if (host_cache)
257 host_cache->clear(); 260 host_cache->clear();
258 } 261 }
259 // Clear all of the passively logged data. 262 // Clear all of the passively logged data.
260 // TODO(eroman): this is a bit heavy handed, really all we need to do is 263 // TODO(eroman): this is a bit heavy handed, really all we need to do is
261 // clear the data pertaining to off the record context. 264 // clear the data pertaining to off the record context.
262 globals_->net_log->passive_collector()->Clear(); 265 globals_->net_log->passive_collector()->Clear();
263 } 266 }
OLDNEW
« no previous file with comments | « chrome/browser/gpu_process_host_ui_shim.cc ('k') | chrome/browser/renderer_host/backing_store_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698