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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 | 706 |
707 cache_path = GetCachePath(cache_path); | 707 cache_path = GetCachePath(cache_path); |
708 request_context_ = ChromeURLRequestContextGetter::CreateOriginal( | 708 request_context_ = ChromeURLRequestContextGetter::CreateOriginal( |
709 this, cookie_path, cache_path, max_size); | 709 this, cookie_path, cache_path, max_size); |
710 | 710 |
711 // The first request context is always a normal (non-OTR) request context. | 711 // The first request context is always a normal (non-OTR) request context. |
712 // Even when Chromium is started in OTR mode, a normal profile is always | 712 // Even when Chromium is started in OTR mode, a normal profile is always |
713 // created first. | 713 // created first. |
714 if (!default_request_context_) { | 714 if (!default_request_context_) { |
715 default_request_context_ = request_context_; | 715 default_request_context_ = request_context_; |
| 716 request_context_->set_is_main(true); |
716 // TODO(eroman): this isn't terribly useful anymore now that the | 717 // TODO(eroman): this isn't terribly useful anymore now that the |
717 // URLRequestContext is constructed by the IO thread... | 718 // URLRequestContext is constructed by the IO thread... |
718 NotificationService::current()->Notify( | 719 NotificationService::current()->Notify( |
719 NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, | 720 NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, |
720 NotificationService::AllSources(), NotificationService::NoDetails()); | 721 NotificationService::AllSources(), NotificationService::NoDetails()); |
721 } | 722 } |
722 } | 723 } |
723 | 724 |
724 return request_context_; | 725 return request_context_; |
725 } | 726 } |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 #if defined(OS_CHROMEOS) | 1275 #if defined(OS_CHROMEOS) |
1275 chromeos::ProxyConfigServiceImpl* | 1276 chromeos::ProxyConfigServiceImpl* |
1276 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { | 1277 ProfileImpl::GetChromeOSProxyConfigServiceImpl() { |
1277 if (!chromeos_proxy_config_service_impl_) { | 1278 if (!chromeos_proxy_config_service_impl_) { |
1278 chromeos_proxy_config_service_impl_ = | 1279 chromeos_proxy_config_service_impl_ = |
1279 new chromeos::ProxyConfigServiceImpl(); | 1280 new chromeos::ProxyConfigServiceImpl(); |
1280 } | 1281 } |
1281 return chromeos_proxy_config_service_impl_; | 1282 return chromeos_proxy_config_service_impl_; |
1282 } | 1283 } |
1283 #endif // defined(OS_CHROMEOS) | 1284 #endif // defined(OS_CHROMEOS) |
OLD | NEW |