| 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_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 // TODO(eroman): this isn't terribly useful anymore now that the | 862 // TODO(eroman): this isn't terribly useful anymore now that the |
| 863 // net::URLRequestContext is constructed by the IO thread... | 863 // net::URLRequestContext is constructed by the IO thread... |
| 864 NotificationService::current()->Notify( | 864 NotificationService::current()->Notify( |
| 865 NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, | 865 NotificationType::DEFAULT_REQUEST_CONTEXT_AVAILABLE, |
| 866 NotificationService::AllSources(), NotificationService::NoDetails()); | 866 NotificationService::AllSources(), NotificationService::NoDetails()); |
| 867 } | 867 } |
| 868 | 868 |
| 869 return request_context; | 869 return request_context; |
| 870 } | 870 } |
| 871 | 871 |
| 872 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForPossibleApp( | 872 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( |
| 873 const Extension* installed_app) { | 873 int renderer_child_id) { |
| 874 if (CommandLine::ForCurrentProcess()->HasSwitch( | 874 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 875 switches::kEnableExperimentalAppManifests) && | 875 switches::kEnableExperimentalAppManifests)) { |
| 876 installed_app != NULL && | 876 const Extension* installed_app = extension_service_-> |
| 877 installed_app->is_storage_isolated()) | 877 GetInstalledAppForRenderer(renderer_child_id); |
| 878 return GetRequestContextForIsolatedApp(installed_app->id()); | 878 if (installed_app != NULL && installed_app->is_storage_isolated()) |
| 879 return GetRequestContextForIsolatedApp(installed_app->id()); |
| 880 } |
| 879 | 881 |
| 880 return GetRequestContext(); | 882 return GetRequestContext(); |
| 881 } | 883 } |
| 882 | 884 |
| 883 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { | 885 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { |
| 884 return io_data_.GetMediaRequestContextGetter(); | 886 return io_data_.GetMediaRequestContextGetter(); |
| 885 } | 887 } |
| 886 | 888 |
| 887 const content::ResourceContext& ProfileImpl::GetResourceContext() { | 889 const content::ResourceContext& ProfileImpl::GetResourceContext() { |
| 888 return io_data_.GetResourceContext(); | 890 return io_data_.GetResourceContext(); |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 return pref_proxy_config_tracker_; | 1553 return pref_proxy_config_tracker_; |
| 1552 } | 1554 } |
| 1553 | 1555 |
| 1554 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1556 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1555 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1557 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
| 1556 return NULL; | 1558 return NULL; |
| 1557 if (!prerender_manager_) | 1559 if (!prerender_manager_) |
| 1558 prerender_manager_ = new prerender::PrerenderManager(this); | 1560 prerender_manager_ = new prerender::PrerenderManager(this); |
| 1559 return prerender_manager_; | 1561 return prerender_manager_; |
| 1560 } | 1562 } |
| OLD | NEW |