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

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

Issue 4097010: Mac: turn on file access checks for the IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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) 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 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/leak_tracker.h" 8 #include "base/debug/leak_tracker.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 this, 226 this,
227 &IOThread::ChangedToOnTheRecordOnIOThread)); 227 &IOThread::ChangedToOnTheRecordOnIOThread));
228 } 228 }
229 229
230 net::ProxyScriptFetcher* IOThread::CreateAndRegisterProxyScriptFetcher( 230 net::ProxyScriptFetcher* IOThread::CreateAndRegisterProxyScriptFetcher(
231 URLRequestContext* url_request_context) { 231 URLRequestContext* url_request_context) {
232 return new ManagedProxyScriptFetcher(url_request_context, this); 232 return new ManagedProxyScriptFetcher(url_request_context, this);
233 } 233 }
234 234
235 void IOThread::Init() { 235 void IOThread::Init() {
236 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 236 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
237 // TODO(evan): test and enable this on all platforms. 237 // TODO(evan): test and enable this on all platforms.
238 // Though this thread is called the "IO" thread, it actually just routes 238 // Though this thread is called the "IO" thread, it actually just routes
239 // messages around; it shouldn't be allowed to perform any blocking disk I/O. 239 // messages around; it shouldn't be allowed to perform any blocking disk I/O.
240 base::ThreadRestrictions::SetIOAllowed(false); 240 base::ThreadRestrictions::SetIOAllowed(false);
241 #endif 241 #endif
242 242
243 BrowserProcessSubThread::Init(); 243 BrowserProcessSubThread::Init();
244 244
245 DCHECK_EQ(MessageLoop::TYPE_IO, message_loop()->type()); 245 DCHECK_EQ(MessageLoop::TYPE_IO, message_loop()->type());
246 246
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 net::HostCache* host_cache = 411 net::HostCache* host_cache =
412 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache(); 412 globals_->host_resolver.get()->GetAsHostResolverImpl()->cache();
413 if (host_cache) 413 if (host_cache)
414 host_cache->clear(); 414 host_cache->clear();
415 } 415 }
416 // Clear all of the passively logged data. 416 // Clear all of the passively logged data.
417 // TODO(eroman): this is a bit heavy handed, really all we need to do is 417 // TODO(eroman): this is a bit heavy handed, really all we need to do is
418 // clear the data pertaining to off the record context. 418 // clear the data pertaining to off the record context.
419 globals_->net_log->passive_collector()->Clear(); 419 globals_->net_log->passive_collector()->Clear();
420 } 420 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698