OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.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/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 if (command_line->HasSwitch(chromeos::switches::kGuestSession)) { | 624 if (command_line->HasSwitch(chromeos::switches::kGuestSession)) { |
625 // TODO(dpolukhin): Hack to enable HTML5 temporary file system for | 625 // TODO(dpolukhin): Hack to enable HTML5 temporary file system for |
626 // the extension. Some component extensions don't work without temporary | 626 // the extension. Some component extensions don't work without temporary |
627 // file system access. Make sure temporary file system is enabled in the off | 627 // file system access. Make sure temporary file system is enabled in the off |
628 // the record browser context (as that is the one used in guest session). | 628 // the record browser context (as that is the one used in guest session). |
629 content::BrowserContext* off_the_record_context = | 629 content::BrowserContext* off_the_record_context = |
630 ExtensionsBrowserClient::Get()->GetOffTheRecordContext( | 630 ExtensionsBrowserClient::Get()->GetOffTheRecordContext( |
631 browser_context_); | 631 browser_context_); |
632 GURL site = content::SiteInstance::GetSiteForURL( | 632 GURL site = content::SiteInstance::GetSiteForURL( |
633 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); | 633 off_the_record_context, Extension::GetBaseURLFromExtensionId(id)); |
634 fileapi::FileSystemContext* file_system_context = | 634 storage::FileSystemContext* file_system_context = |
635 content::BrowserContext::GetStoragePartitionForSite( | 635 content::BrowserContext::GetStoragePartitionForSite( |
636 off_the_record_context, site)->GetFileSystemContext(); | 636 off_the_record_context, site)->GetFileSystemContext(); |
637 file_system_context->EnableTemporaryFileSystemInIncognito(); | 637 file_system_context->EnableTemporaryFileSystemInIncognito(); |
638 } | 638 } |
639 #endif | 639 #endif |
640 } | 640 } |
641 | 641 |
642 } // namespace extensions | 642 } // namespace extensions |
OLD | NEW |