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_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 scoped_refptr<ChromeURLRequestContext> | 219 scoped_refptr<ChromeURLRequestContext> |
220 ProfileIOData::GetExtensionsRequestContext() const { | 220 ProfileIOData::GetExtensionsRequestContext() const { |
221 LazyInitialize(); | 221 LazyInitialize(); |
222 scoped_refptr<ChromeURLRequestContext> context = | 222 scoped_refptr<ChromeURLRequestContext> context = |
223 AcquireExtensionsRequestContext(); | 223 AcquireExtensionsRequestContext(); |
224 DCHECK(context); | 224 DCHECK(context); |
225 return context; | 225 return context; |
226 } | 226 } |
227 | 227 |
| 228 scoped_refptr<ChromeURLRequestContext> |
| 229 ProfileIOData::GetIsolatedAppRequestContext( |
| 230 scoped_refptr<ChromeURLRequestContext> main_context, |
| 231 const Extension* installed_app) const { |
| 232 LazyInitialize(); |
| 233 scoped_refptr<ChromeURLRequestContext> context = |
| 234 AcquireIsolatedAppRequestContext(main_context, installed_app); |
| 235 DCHECK(context); |
| 236 return context; |
| 237 } |
| 238 |
228 void ProfileIOData::LazyInitialize() const { | 239 void ProfileIOData::LazyInitialize() const { |
229 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 240 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
230 if (initialized_) | 241 if (initialized_) |
231 return; | 242 return; |
232 LazyInitializeInternal(); | 243 LazyInitializeInternal(); |
233 initialized_ = true; | 244 initialized_ = true; |
234 } | 245 } |
235 | 246 |
236 // static | 247 // static |
237 void ProfileIOData::ApplyProfileParamsToContext( | 248 void ProfileIOData::ApplyProfileParamsToContext( |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 346 |
336 #if defined(OS_CHROMEOS) | 347 #if defined(OS_CHROMEOS) |
337 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { | 348 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { |
338 chromeos::CrosLibrary::Get()->GetLibCrosServiceLibrary()-> | 349 chromeos::CrosLibrary::Get()->GetLibCrosServiceLibrary()-> |
339 RegisterNetworkProxyHandler(proxy_service); | 350 RegisterNetworkProxyHandler(proxy_service); |
340 } | 351 } |
341 #endif // defined(OS_CHROMEOS) | 352 #endif // defined(OS_CHROMEOS) |
342 | 353 |
343 return proxy_service; | 354 return proxy_service; |
344 } | 355 } |
OLD | NEW |