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

Side by Side Diff: chrome/browser/browsing_data/cookies_tree_model_unittest.cc

Issue 2351803002: Switching ExtensionSpecialStoragePolicy::IsStorageDurable to use DurableStoragePermissionContext. (Closed)
Patch Set: Switching IsStorageDurable() to use DurableStoragePermissionContext. Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_special_storage_policy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browsing_data/cookies_tree_model.h" 5 #include "chrome/browser/browsing_data/cookies_tree_model.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 new MockBrowsingDataQuotaHelper(profile_.get()); 75 new MockBrowsingDataQuotaHelper(profile_.get());
76 mock_browsing_data_channel_id_helper_ = 76 mock_browsing_data_channel_id_helper_ =
77 new MockBrowsingDataChannelIDHelper(); 77 new MockBrowsingDataChannelIDHelper();
78 mock_browsing_data_service_worker_helper_ = 78 mock_browsing_data_service_worker_helper_ =
79 new MockBrowsingDataServiceWorkerHelper(profile_.get()); 79 new MockBrowsingDataServiceWorkerHelper(profile_.get());
80 mock_browsing_data_cache_storage_helper_ = 80 mock_browsing_data_cache_storage_helper_ =
81 new MockBrowsingDataCacheStorageHelper(profile_.get()); 81 new MockBrowsingDataCacheStorageHelper(profile_.get());
82 mock_browsing_data_flash_lso_helper_ = 82 mock_browsing_data_flash_lso_helper_ =
83 new MockBrowsingDataFlashLSOHelper(profile_.get()); 83 new MockBrowsingDataFlashLSOHelper(profile_.get());
84 84
85 const char kExtensionScheme[] = "extensionscheme";
86 scoped_refptr<content_settings::CookieSettings> cookie_settings =
87 new content_settings::CookieSettings(
88 HostContentSettingsMapFactory::GetForProfile(profile_.get()),
89 profile_->GetPrefs(),
90 kExtensionScheme);
91 #if defined(ENABLE_EXTENSIONS) 85 #if defined(ENABLE_EXTENSIONS)
92 special_storage_policy_ = 86 special_storage_policy_ =
93 new ExtensionSpecialStoragePolicy(cookie_settings.get()); 87 new ExtensionSpecialStoragePolicy(profile_.get());
94 #endif 88 #endif
95 } 89 }
96 90
97 void TearDown() override { 91 void TearDown() override {
98 mock_browsing_data_service_worker_helper_ = nullptr; 92 mock_browsing_data_service_worker_helper_ = nullptr;
99 mock_browsing_data_cache_storage_helper_ = nullptr; 93 mock_browsing_data_cache_storage_helper_ = nullptr;
100 mock_browsing_data_channel_id_helper_ = nullptr; 94 mock_browsing_data_channel_id_helper_ = nullptr;
101 mock_browsing_data_quota_helper_ = nullptr; 95 mock_browsing_data_quota_helper_ = nullptr;
102 mock_browsing_data_file_system_helper_ = nullptr; 96 mock_browsing_data_file_system_helper_ = nullptr;
103 mock_browsing_data_indexed_db_helper_ = nullptr; 97 mock_browsing_data_indexed_db_helper_ = nullptr;
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 "http://host1:1/,http://host2:2/,http-so://foobar.host3:3/," 1680 "http://host1:1/,http://host2:2/,http-so://foobar.host3:3/,"
1687 "http-so://foobar.host4:4/,http://host4:4/", 1681 "http-so://foobar.host4:4/,http://host4:4/",
1688 GetDisplayedLocalStorages(&cookies_model)); 1682 GetDisplayedLocalStorages(&cookies_model));
1689 // Delete host4, which should delete foobar_host4:4 in addition to host4:4 1683 // Delete host4, which should delete foobar_host4:4 in addition to host4:4
1690 DeleteStoredObjects(cookies_model.GetRoot()->GetChild(3)); 1684 DeleteStoredObjects(cookies_model.GetRoot()->GetChild(3));
1691 EXPECT_EQ(10, cookies_model.GetRoot()->GetTotalNodeCount()); 1685 EXPECT_EQ(10, cookies_model.GetRoot()->GetTotalNodeCount());
1692 } 1686 }
1693 } 1687 }
1694 1688
1695 } // namespace 1689 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_special_storage_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698