| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 return iter->second; | 132 return iter->second; |
| 133 | 133 |
| 134 ChromeURLRequestContextGetter* context = | 134 ChromeURLRequestContextGetter* context = |
| 135 ChromeURLRequestContextGetter::CreateOriginalForIsolatedApp( | 135 ChromeURLRequestContextGetter::CreateOriginalForIsolatedApp( |
| 136 profile_, io_data_, app_id); | 136 profile_, io_data_, app_id); |
| 137 app_request_context_getter_map_[app_id] = context; | 137 app_request_context_getter_map_[app_id] = context; |
| 138 | 138 |
| 139 return context; | 139 return context; |
| 140 } | 140 } |
| 141 | 141 |
| 142 chrome_browser_net::Predictor* ProfileImplIOData::Handle::GetPredictor() { |
| 143 return io_data_->GetPredictor(); |
| 144 } |
| 145 |
| 146 void ProfileImplIOData::Handle::SetPredictor( |
| 147 chrome_browser_net::Predictor* predictor) { |
| 148 io_data_->SetPredictor(predictor); |
| 149 } |
| 150 |
| 142 void ProfileImplIOData::Handle::LazyInitialize() const { | 151 void ProfileImplIOData::Handle::LazyInitialize() const { |
| 143 if (!initialized_) { | 152 if (!initialized_) { |
| 144 io_data_->InitializeProfileParams(profile_); | 153 io_data_->InitializeProfileParams(profile_); |
| 145 ChromeNetworkDelegate::InitializeReferrersEnabled( | 154 ChromeNetworkDelegate::InitializeReferrersEnabled( |
| 146 io_data_->enable_referrers(), profile_->GetPrefs()); | 155 io_data_->enable_referrers(), profile_->GetPrefs()); |
| 147 initialized_ = true; | 156 initialized_ = true; |
| 148 } | 157 } |
| 149 } | 158 } |
| 150 | 159 |
| 151 ProfileImplIOData::LazyParams::LazyParams() | 160 ProfileImplIOData::LazyParams::LazyParams() |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 ProfileImplIOData::AcquireIsolatedAppRequestContext( | 380 ProfileImplIOData::AcquireIsolatedAppRequestContext( |
| 372 scoped_refptr<ChromeURLRequestContext> main_context, | 381 scoped_refptr<ChromeURLRequestContext> main_context, |
| 373 const std::string& app_id) const { | 382 const std::string& app_id) const { |
| 374 // We create per-app contexts on demand, unlike the others above. | 383 // We create per-app contexts on demand, unlike the others above. |
| 375 scoped_refptr<RequestContext> app_request_context = | 384 scoped_refptr<RequestContext> app_request_context = |
| 376 InitializeAppRequestContext(main_context, app_id); | 385 InitializeAppRequestContext(main_context, app_id); |
| 377 DCHECK(app_request_context); | 386 DCHECK(app_request_context); |
| 378 app_request_context->set_profile_io_data(this); | 387 app_request_context->set_profile_io_data(this); |
| 379 return app_request_context; | 388 return app_request_context; |
| 380 } | 389 } |
| OLD | NEW |