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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 ChromeURLRequestContextGetter* context = | 150 ChromeURLRequestContextGetter* context = |
151 ChromeURLRequestContextGetter::CreateOriginalForIsolatedApp( | 151 ChromeURLRequestContextGetter::CreateOriginalForIsolatedApp( |
152 profile_, io_data_, app_id); | 152 profile_, io_data_, app_id); |
153 app_request_context_getter_map_[app_id] = context; | 153 app_request_context_getter_map_[app_id] = context; |
154 | 154 |
155 return context; | 155 return context; |
156 } | 156 } |
157 | 157 |
158 void ProfileImplIOData::Handle::LazyInitialize() const { | 158 void ProfileImplIOData::Handle::LazyInitialize() const { |
159 if (!initialized_) { | 159 if (!initialized_) { |
160 io_data_->InitializeProfileParams(profile_); | 160 io_data_->InitializeOnUIThread(profile_); |
161 ChromeNetworkDelegate::InitializeReferrersEnabled( | 161 ChromeNetworkDelegate::InitializeReferrersEnabled( |
162 io_data_->enable_referrers(), profile_->GetPrefs()); | 162 io_data_->enable_referrers(), profile_->GetPrefs()); |
163 io_data_->clear_local_state_on_exit()->Init( | 163 io_data_->clear_local_state_on_exit()->Init( |
164 prefs::kClearSiteDataOnExit, profile_->GetPrefs(), NULL); | 164 prefs::kClearSiteDataOnExit, profile_->GetPrefs(), NULL); |
165 io_data_->clear_local_state_on_exit()->MoveToThread(BrowserThread::IO); | 165 io_data_->clear_local_state_on_exit()->MoveToThread(BrowserThread::IO); |
166 #if defined(ENABLE_SAFE_BROWSING) | 166 #if defined(ENABLE_SAFE_BROWSING) |
167 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, | 167 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, |
168 profile_->GetPrefs(), NULL); | 168 profile_->GetPrefs(), NULL); |
169 io_data_->safe_browsing_enabled()->MoveToThread(BrowserThread::IO); | 169 io_data_->safe_browsing_enabled()->MoveToThread(BrowserThread::IO); |
170 #endif | 170 #endif |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 scoped_refptr<ChromeURLRequestContext> | 410 scoped_refptr<ChromeURLRequestContext> |
411 ProfileImplIOData::AcquireIsolatedAppRequestContext( | 411 ProfileImplIOData::AcquireIsolatedAppRequestContext( |
412 scoped_refptr<ChromeURLRequestContext> main_context, | 412 scoped_refptr<ChromeURLRequestContext> main_context, |
413 const std::string& app_id) const { | 413 const std::string& app_id) const { |
414 // We create per-app contexts on demand, unlike the others above. | 414 // We create per-app contexts on demand, unlike the others above. |
415 scoped_refptr<ChromeURLRequestContext> app_request_context = | 415 scoped_refptr<ChromeURLRequestContext> app_request_context = |
416 InitializeAppRequestContext(main_context, app_id); | 416 InitializeAppRequestContext(main_context, app_id); |
417 DCHECK(app_request_context); | 417 DCHECK(app_request_context); |
418 return app_request_context; | 418 return app_request_context; |
419 } | 419 } |
OLD | NEW |