| 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/data_deleter.h" | 5 #include "chrome/browser/extensions/data_deleter.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/storage/settings_frontend.h" | 7 #include "chrome/browser/extensions/api/storage/settings_frontend.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 9 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" | 11 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" |
| 12 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 12 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
| 13 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/site_instance.h" | 15 #include "content/public/browser/site_instance.h" |
| 16 #include "content/public/browser/storage_partition.h" | 16 #include "content/public/browser/storage_partition.h" |
| 17 #include "extensions/browser/extension_prefs.h" |
| 17 #include "extensions/common/constants.h" | 18 #include "extensions/common/constants.h" |
| 18 #include "extensions/common/extension.h" | 19 #include "extensions/common/extension.h" |
| 19 #include "net/url_request/url_request_context_getter.h" | 20 #include "net/url_request/url_request_context_getter.h" |
| 20 | 21 |
| 21 using base::WeakPtr; | 22 using base::WeakPtr; |
| 22 using content::BrowserContext; | 23 using content::BrowserContext; |
| 23 using content::BrowserThread; | 24 using content::BrowserThread; |
| 24 using content::StoragePartition; | 25 using content::StoragePartition; |
| 25 | 26 |
| 26 namespace { | 27 namespace { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 (~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE), | 59 (~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE), |
| 59 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL, | 60 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL, |
| 60 origin, | 61 origin, |
| 61 partition->GetURLRequestContext()); | 62 partition->GetURLRequestContext()); |
| 62 } | 63 } |
| 63 } | 64 } |
| 64 | 65 |
| 65 void OnNeedsToGarbageCollectIsolatedStorage(WeakPtr<ExtensionService> es) { | 66 void OnNeedsToGarbageCollectIsolatedStorage(WeakPtr<ExtensionService> es) { |
| 66 if (!es) | 67 if (!es) |
| 67 return; | 68 return; |
| 68 es->extension_prefs()->SetNeedsStorageGarbageCollection(true); | 69 extensions::ExtensionPrefs::Get(es->profile())-> |
| 70 SetNeedsStorageGarbageCollection(true); |
| 69 } | 71 } |
| 70 | 72 |
| 71 } // namespace | 73 } // namespace |
| 72 | 74 |
| 73 namespace extensions { | 75 namespace extensions { |
| 74 | 76 |
| 75 // static | 77 // static |
| 76 void DataDeleter::StartDeleting(Profile* profile, const Extension* extension) { | 78 void DataDeleter::StartDeleting(Profile* profile, const Extension* extension) { |
| 77 DCHECK(profile); | 79 DCHECK(profile); |
| 78 DCHECK(extension); | 80 DCHECK(extension); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 98 } | 100 } |
| 99 DeleteOrigin(profile, partition, extension->url()); | 101 DeleteOrigin(profile, partition, extension->url()); |
| 100 } | 102 } |
| 101 | 103 |
| 102 // Begin removal of the settings for the current extension. | 104 // Begin removal of the settings for the current extension. |
| 103 profile->GetExtensionService()->settings_frontend()-> | 105 profile->GetExtensionService()->settings_frontend()-> |
| 104 DeleteStorageSoon(extension->id()); | 106 DeleteStorageSoon(extension->id()); |
| 105 } | 107 } |
| 106 | 108 |
| 107 } // namespace extensions | 109 } // namespace extensions |
| OLD | NEW |