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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 | 715 |
716 cache_path = GetCachePath(cache_path); | 716 cache_path = GetCachePath(cache_path); |
717 request_context_ = ChromeURLRequestContextGetter::CreateOriginal( | 717 request_context_ = ChromeURLRequestContextGetter::CreateOriginal( |
718 this, cookie_path, cache_path, max_size); | 718 this, cookie_path, cache_path, max_size); |
719 | 719 |
720 // The first request context is always a normal (non-OTR) request context. | 720 // The first request context is always a normal (non-OTR) request context. |
721 // Even when Chromium is started in OTR mode, a normal profile is always | 721 // Even when Chromium is started in OTR mode, a normal profile is always |
722 // created first. | 722 // created first. |
723 if (!default_request_context_) { | 723 if (!default_request_context_) { |
724 default_request_context_ = request_context_; | 724 default_request_context_ = request_context_; |
725 request_context_->set_is_main(true); | |
726 // TODO(eroman): this isn't terribly useful anymore now that the | 725 // TODO(eroman): this isn't terribly useful anymore now that the |
727 // URLRequestContext is constructed by the IO thread... | 726 // URLRequestContext is constructed by the IO thread... |
728 NotificationService::current()->Notify( | 727 NotificationService::current()->Notify( |
729 NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, | 728 NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, |
730 NotificationService::AllSources(), NotificationService::NoDetails()); | 729 NotificationService::AllSources(), NotificationService::NoDetails()); |
731 } | 730 } |
732 } | 731 } |
733 | 732 |
734 return request_context_; | 733 return request_context_; |
735 } | 734 } |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 #if defined(OS_CHROMEOS) | 1316 #if defined(OS_CHROMEOS) |
1318 chromeos::ProxyConfigServiceImpl* | 1317 chromeos::ProxyConfigServiceImpl* |
1319 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { | 1318 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { |
1320 if (!chromeos_proxy_config_service_impl_) { | 1319 if (!chromeos_proxy_config_service_impl_) { |
1321 chromeos_proxy_config_service_impl_ = | 1320 chromeos_proxy_config_service_impl_ = |
1322 new chromeos::ProxyConfigServiceImpl(); | 1321 new chromeos::ProxyConfigServiceImpl(); |
1323 } | 1322 } |
1324 return chromeos_proxy_config_service_impl_; | 1323 return chromeos_proxy_config_service_impl_; |
1325 } | 1324 } |
1326 #endif // defined(OS_CHROMEOS) | 1325 #endif // defined(OS_CHROMEOS) |
OLD | NEW |