Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4169)

Unified Diff: chrome/browser/extensions/data_deleter.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android webview init fix merged in. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/data_deleter.cc
diff --git a/chrome/browser/extensions/data_deleter.cc b/chrome/browser/extensions/data_deleter.cc
index 8d53a42369c8458db5b87fbd06460c23f24910c6..c2713211b038c6bfc093d8686fdd86cd00c6f9b1 100644
--- a/chrome/browser/extensions/data_deleter.cc
+++ b/chrome/browser/extensions/data_deleter.cc
@@ -29,35 +29,11 @@ void DataDeleter::StartDeleting(Profile* profile,
const GURL& site = Extension::GetBaseURLFromExtensionId(extension_id);
- StoragePartition* partition =
- BrowserContext::GetStoragePartitionForSite(profile, site);
-
- if (storage_origin.SchemeIs(extensions::kExtensionScheme)) {
- // TODO(ajwong): Cookies are not properly isolated for
- // chrome-extension:// scheme. (http://crbug.com/158386).
- //
- // However, no isolated apps actually can write to kExtensionScheme
- // origins. Thus, it is benign to delete from the
- // RequestContextForExtensions because there's nothing stored there. We
- // preserve this code path without checking for isolation because it's
- // simpler than special casing. This code should go away once we merge
- // the various URLRequestContexts (http://crbug.com/159193).
- partition->ClearDataForOrigin(
- StoragePartition::REMOVE_DATA_MASK_ALL &
- (~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE),
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
- storage_origin,
- profile->GetRequestContextForExtensions());
- } else {
- // We don't need to worry about the media request context because that
- // shares the same cookie store as the main request context.
- partition->ClearDataForOrigin(
- StoragePartition::REMOVE_DATA_MASK_ALL &
- (~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE),
- StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
- storage_origin,
- partition->GetURLRequestContext());
- }
+ BrowserContext::GetStoragePartitionForSite(profile, site)->
+ ClearDataForOrigin((StoragePartition::REMOVE_DATA_MASK_ALL &
+ ~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE),
+ StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
+ storage_origin);
// Begin removal of the settings for the current extension.
profile->GetExtensionService()->settings_frontend()->

Powered by Google App Engine
This is Rietveld 408576698