| 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 BrowserThread::FILE, FROM_HERE, | 819 BrowserThread::FILE, FROM_HERE, |
| 820 base::Bind( | 820 base::Bind( |
| 821 &extension_file_util::UninstallExtension, | 821 &extension_file_util::UninstallExtension, |
| 822 install_directory_, | 822 install_directory_, |
| 823 extension_id))) | 823 extension_id))) |
| 824 NOTREACHED(); | 824 NOTREACHED(); |
| 825 } | 825 } |
| 826 | 826 |
| 827 GURL launch_web_url_origin(extension->launch_web_url()); | 827 GURL launch_web_url_origin(extension->launch_web_url()); |
| 828 launch_web_url_origin = launch_web_url_origin.GetOrigin(); | 828 launch_web_url_origin = launch_web_url_origin.GetOrigin(); |
| 829 bool is_storage_isolated = | 829 bool is_storage_isolated = extension->is_storage_isolated(); |
| 830 (extension->is_storage_isolated() && | |
| 831 extension->HasAPIPermission(ExtensionAPIPermission::kExperimental)); | |
| 832 | 830 |
| 833 if (extension->is_hosted_app() && | 831 if (extension->is_hosted_app() && |
| 834 !profile_->GetExtensionSpecialStoragePolicy()-> | 832 !profile_->GetExtensionSpecialStoragePolicy()-> |
| 835 IsStorageProtected(launch_web_url_origin)) { | 833 IsStorageProtected(launch_web_url_origin)) { |
| 836 ExtensionDataDeleter::StartDeleting( | 834 ExtensionDataDeleter::StartDeleting( |
| 837 profile_, extension_id, launch_web_url_origin, is_storage_isolated); | 835 profile_, extension_id, launch_web_url_origin, is_storage_isolated); |
| 838 } | 836 } |
| 839 ExtensionDataDeleter::StartDeleting( | 837 ExtensionDataDeleter::StartDeleting( |
| 840 profile_, extension_id, extension->url(), is_storage_isolated); | 838 profile_, extension_id, extension->url(), is_storage_isolated); |
| 841 | 839 |
| (...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2650 // To coexist with certain unit tests that don't have an IO thread message | 2648 // To coexist with certain unit tests that don't have an IO thread message |
| 2651 // loop available at ExtensionService shutdown, we lazy-initialize this | 2649 // loop available at ExtensionService shutdown, we lazy-initialize this |
| 2652 // object so that those cases neither create nor destroy an | 2650 // object so that those cases neither create nor destroy an |
| 2653 // APIResourceController. | 2651 // APIResourceController. |
| 2654 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 2652 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 2655 if (!api_resource_controller_) { | 2653 if (!api_resource_controller_) { |
| 2656 api_resource_controller_ = new extensions::APIResourceController(); | 2654 api_resource_controller_ = new extensions::APIResourceController(); |
| 2657 } | 2655 } |
| 2658 return api_resource_controller_; | 2656 return api_resource_controller_; |
| 2659 } | 2657 } |
| OLD | NEW |