| 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.h" | 5 #include "chrome/browser/profiles/profile.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 CreateQuotaManagerAndClients(); | 471 CreateQuotaManagerAndClients(); |
| 472 return quota_manager_.get(); | 472 return quota_manager_.get(); |
| 473 } | 473 } |
| 474 | 474 |
| 475 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 475 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| 476 int renderer_child_id) { | 476 int renderer_child_id) { |
| 477 if (GetExtensionService()) { | 477 if (GetExtensionService()) { |
| 478 const Extension* installed_app = GetExtensionService()-> | 478 const Extension* installed_app = GetExtensionService()-> |
| 479 GetInstalledAppForRenderer(renderer_child_id); | 479 GetInstalledAppForRenderer(renderer_child_id); |
| 480 if (installed_app != NULL && installed_app->is_storage_isolated() && | 480 if (installed_app != NULL && installed_app->is_storage_isolated() && |
| 481 installed_app->HasApiPermission(Extension::kExperimentalPermission)) { | 481 installed_app->HasAPIPermission( |
| 482 ExtensionAPIPermission::kExperimental)) { |
| 482 return GetRequestContextForIsolatedApp(installed_app->id()); | 483 return GetRequestContextForIsolatedApp(installed_app->id()); |
| 483 } | 484 } |
| 484 } | 485 } |
| 485 return GetRequestContext(); | 486 return GetRequestContext(); |
| 486 } | 487 } |
| 487 | 488 |
| 488 virtual net::URLRequestContextGetter* GetRequestContextForMedia() { | 489 virtual net::URLRequestContextGetter* GetRequestContextForMedia() { |
| 489 // In OTR mode, media request context is the same as the original one. | 490 // In OTR mode, media request context is the same as the original one. |
| 490 return io_data_.GetMainRequestContextGetter(); | 491 return io_data_.GetMainRequestContextGetter(); |
| 491 } | 492 } |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 }; | 852 }; |
| 852 #endif | 853 #endif |
| 853 | 854 |
| 854 Profile* Profile::CreateOffTheRecordProfile() { | 855 Profile* Profile::CreateOffTheRecordProfile() { |
| 855 #if defined(OS_CHROMEOS) | 856 #if defined(OS_CHROMEOS) |
| 856 if (Profile::IsGuestSession()) | 857 if (Profile::IsGuestSession()) |
| 857 return new GuestSessionProfile(this); | 858 return new GuestSessionProfile(this); |
| 858 #endif | 859 #endif |
| 859 return new OffTheRecordProfileImpl(this); | 860 return new OffTheRecordProfileImpl(this); |
| 860 } | 861 } |
| OLD | NEW |