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/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 24 matching lines...) Expand all Loading... |
35 // TODO(ajwong): Cookies are not properly isolated for | 35 // TODO(ajwong): Cookies are not properly isolated for |
36 // chrome-extension:// scheme. (http://crbug.com/158386). | 36 // chrome-extension:// scheme. (http://crbug.com/158386). |
37 // | 37 // |
38 // However, no isolated apps actually can write to kExtensionScheme | 38 // However, no isolated apps actually can write to kExtensionScheme |
39 // origins. Thus, it is benign to delete from the | 39 // origins. Thus, it is benign to delete from the |
40 // RequestContextForExtensions because there's nothing stored there. We | 40 // RequestContextForExtensions because there's nothing stored there. We |
41 // preserve this code path without checking for isolation because it's | 41 // preserve this code path without checking for isolation because it's |
42 // simpler than special casing. This code should go away once we merge | 42 // simpler than special casing. This code should go away once we merge |
43 // the various URLRequestContexts (http://crbug.com/159193). | 43 // the various URLRequestContexts (http://crbug.com/159193). |
44 partition->AsyncClearDataForOrigin( | 44 partition->AsyncClearDataForOrigin( |
| 45 content::StoragePartition::kAllStorage, |
45 storage_origin, | 46 storage_origin, |
46 profile->GetRequestContextForExtensions()); | 47 profile->GetRequestContextForExtensions()); |
47 } else { | 48 } else { |
48 // We don't need to worry about the media request context because that | 49 // We don't need to worry about the media request context because that |
49 // shares the same cookie store as the main request context. | 50 // shares the same cookie store as the main request context. |
50 partition->AsyncClearDataForOrigin(storage_origin, | 51 partition->AsyncClearDataForOrigin(content::StoragePartition::kAllStorage, |
| 52 storage_origin, |
51 partition->GetURLRequestContext()); | 53 partition->GetURLRequestContext()); |
52 } | 54 } |
53 | 55 |
54 // Begin removal of the settings for the current extension. | 56 // Begin removal of the settings for the current extension. |
55 profile->GetExtensionService()->settings_frontend()-> | 57 profile->GetExtensionService()->settings_frontend()-> |
56 DeleteStorageSoon(extension_id); | 58 DeleteStorageSoon(extension_id); |
57 } | 59 } |
58 | 60 |
59 } // namespace extensions | 61 } // namespace extensions |
OLD | NEW |