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