| 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 "chrome/browser/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 ALLOW_THIS_IN_INITIALIZER_LIST( | 260 ALLOW_THIS_IN_INITIALIZER_LIST( |
| 261 resource_context_(new ResourceContext(this))), | 261 resource_context_(new ResourceContext(this))), |
| 262 initialized_on_UI_thread_(false) { | 262 initialized_on_UI_thread_(false) { |
| 263 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 263 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 264 } | 264 } |
| 265 | 265 |
| 266 ProfileIOData::~ProfileIOData() { | 266 ProfileIOData::~ProfileIOData() { |
| 267 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) | 267 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) |
| 268 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 268 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 269 | 269 |
| 270 #if 0 | |
| 271 // TODO(willchan): If I am ever able to enable this assertion and have it | |
| 272 // stick, I'm going to party like it's 2008. | |
| 273 if (main_request_context_) | 270 if (main_request_context_) |
| 274 main_request_context_->AssertNoURLRequests(); | 271 main_request_context_->AssertNoURLRequests(); |
| 275 #endif | |
| 276 if (extensions_request_context_) | 272 if (extensions_request_context_) |
| 277 extensions_request_context_->AssertNoURLRequests(); | 273 extensions_request_context_->AssertNoURLRequests(); |
| 278 for (AppRequestContextMap::iterator it = app_request_context_map_.begin(); | 274 for (AppRequestContextMap::iterator it = app_request_context_map_.begin(); |
| 279 it != app_request_context_map_.end(); ++it) { | 275 it != app_request_context_map_.end(); ++it) { |
| 280 it->second->AssertNoURLRequests(); | 276 it->second->AssertNoURLRequests(); |
| 281 } | 277 } |
| 282 } | 278 } |
| 283 | 279 |
| 284 // static | 280 // static |
| 285 ProfileIOData* ProfileIOData::FromResourceContext( | 281 ProfileIOData* ProfileIOData::FromResourceContext( |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 } | 535 } |
| 540 | 536 |
| 541 void ProfileIOData::set_server_bound_cert_service( | 537 void ProfileIOData::set_server_bound_cert_service( |
| 542 net::ServerBoundCertService* server_bound_cert_service) const { | 538 net::ServerBoundCertService* server_bound_cert_service) const { |
| 543 server_bound_cert_service_.reset(server_bound_cert_service); | 539 server_bound_cert_service_.reset(server_bound_cert_service); |
| 544 } | 540 } |
| 545 | 541 |
| 546 void ProfileIOData::DestroyResourceContext() { | 542 void ProfileIOData::DestroyResourceContext() { |
| 547 resource_context_.reset(); | 543 resource_context_.reset(); |
| 548 } | 544 } |
| OLD | NEW |