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

Side by Side Diff: chrome/browser/extensions/data_deleter.cc

Issue 21646002: Rename enum in StoragePartition according to style guide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the TODO. 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 unified diff | Download patch
OLDNEW
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/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 27 matching lines...) Expand all
38 // 38 //
39 // However, no isolated apps actually can write to kExtensionScheme 39 // However, no isolated apps actually can write to kExtensionScheme
40 // origins. Thus, it is benign to delete from the 40 // origins. Thus, it is benign to delete from the
41 // RequestContextForExtensions because there's nothing stored there. We 41 // RequestContextForExtensions because there's nothing stored there. We
42 // preserve this code path without checking for isolation because it's 42 // preserve this code path without checking for isolation because it's
43 // simpler than special casing. This code should go away once we merge 43 // simpler than special casing. This code should go away once we merge
44 // the various URLRequestContexts (http://crbug.com/159193). 44 // the various URLRequestContexts (http://crbug.com/159193).
45 partition->ClearDataForOrigin( 45 partition->ClearDataForOrigin(
46 StoragePartition::REMOVE_DATA_MASK_ALL & 46 StoragePartition::REMOVE_DATA_MASK_ALL &
47 (~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE), 47 (~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE),
48 StoragePartition::kAllStorage, 48 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
49 storage_origin, 49 storage_origin,
50 profile->GetRequestContextForExtensions()); 50 profile->GetRequestContextForExtensions());
51 } else { 51 } else {
52 // We don't need to worry about the media request context because that 52 // We don't need to worry about the media request context because that
53 // shares the same cookie store as the main request context. 53 // shares the same cookie store as the main request context.
54 partition->ClearDataForOrigin( 54 partition->ClearDataForOrigin(
55 StoragePartition::REMOVE_DATA_MASK_ALL & 55 StoragePartition::REMOVE_DATA_MASK_ALL &
56 (~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE), 56 (~StoragePartition::REMOVE_DATA_MASK_SHADER_CACHE),
57 StoragePartition::kAllStorage, 57 StoragePartition::QUOTA_MANAGED_STORAGE_MASK_ALL,
58 storage_origin, 58 storage_origin,
59 partition->GetURLRequestContext()); 59 partition->GetURLRequestContext());
60 } 60 }
61 61
62 // Begin removal of the settings for the current extension. 62 // Begin removal of the settings for the current extension.
63 profile->GetExtensionService()->settings_frontend()-> 63 profile->GetExtensionService()->settings_frontend()->
64 DeleteStorageSoon(extension_id); 64 DeleteStorageSoon(extension_id);
65 } 65 }
66 66
67 } // namespace extensions 67 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | content/browser/storage_partition_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698