| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/profile_impl.h" | 5 #include "chrome/browser/profile_impl.h" |
| 6 | 6 |
| 7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 | 701 |
| 702 cache_path = GetCachePath(cache_path); | 702 cache_path = GetCachePath(cache_path); |
| 703 request_context_ = ChromeURLRequestContextGetter::CreateOriginal( | 703 request_context_ = ChromeURLRequestContextGetter::CreateOriginal( |
| 704 this, cookie_path, cache_path, max_size); | 704 this, cookie_path, cache_path, max_size); |
| 705 | 705 |
| 706 // The first request context is always a normal (non-OTR) request context. | 706 // The first request context is always a normal (non-OTR) request context. |
| 707 // Even when Chromium is started in OTR mode, a normal profile is always | 707 // Even when Chromium is started in OTR mode, a normal profile is always |
| 708 // created first. | 708 // created first. |
| 709 if (!default_request_context_) { | 709 if (!default_request_context_) { |
| 710 default_request_context_ = request_context_; | 710 default_request_context_ = request_context_; |
| 711 request_context_->set_is_main(true); |
| 711 // TODO(eroman): this isn't terribly useful anymore now that the | 712 // TODO(eroman): this isn't terribly useful anymore now that the |
| 712 // URLRequestContext is constructed by the IO thread... | 713 // URLRequestContext is constructed by the IO thread... |
| 713 NotificationService::current()->Notify( | 714 NotificationService::current()->Notify( |
| 714 NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, | 715 NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, |
| 715 NotificationService::AllSources(), NotificationService::NoDetails()); | 716 NotificationService::AllSources(), NotificationService::NoDetails()); |
| 716 } | 717 } |
| 717 } | 718 } |
| 718 | 719 |
| 719 return request_context_; | 720 return request_context_; |
| 720 } | 721 } |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 #if defined(OS_CHROMEOS) | 1302 #if defined(OS_CHROMEOS) |
| 1302 chromeos::ProxyConfigServiceImpl* | 1303 chromeos::ProxyConfigServiceImpl* |
| 1303 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { | 1304 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { |
| 1304 if (!chromeos_proxy_config_service_impl_) { | 1305 if (!chromeos_proxy_config_service_impl_) { |
| 1305 chromeos_proxy_config_service_impl_ = | 1306 chromeos_proxy_config_service_impl_ = |
| 1306 new chromeos::ProxyConfigServiceImpl(); | 1307 new chromeos::ProxyConfigServiceImpl(); |
| 1307 } | 1308 } |
| 1308 return chromeos_proxy_config_service_impl_; | 1309 return chromeos_proxy_config_service_impl_; |
| 1309 } | 1310 } |
| 1310 #endif // defined(OS_CHROMEOS) | 1311 #endif // defined(OS_CHROMEOS) |
| OLD | NEW |