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/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 Loading... | |
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"; | 85 const char kExtensionScheme[] = "extensionscheme"; |
msramek
2016/10/07 16:17:21
|kExtensionScheme| and |cookie_settings| are now u
dougt
2016/10/08 02:19:52
Acknowledged.
| |
86 scoped_refptr<content_settings::CookieSettings> cookie_settings = | 86 scoped_refptr<content_settings::CookieSettings> cookie_settings = |
87 new content_settings::CookieSettings( | 87 new content_settings::CookieSettings( |
88 HostContentSettingsMapFactory::GetForProfile(profile_.get()), | 88 HostContentSettingsMapFactory::GetForProfile(profile_.get()), |
89 profile_->GetPrefs(), | 89 profile_->GetPrefs(), |
90 kExtensionScheme); | 90 kExtensionScheme); |
91 #if defined(ENABLE_EXTENSIONS) | 91 #if defined(ENABLE_EXTENSIONS) |
92 special_storage_policy_ = | 92 special_storage_policy_ = |
93 new ExtensionSpecialStoragePolicy(cookie_settings.get()); | 93 new ExtensionSpecialStoragePolicy(profile_.get()); |
94 #endif | 94 #endif |
95 } | 95 } |
96 | 96 |
97 void TearDown() override { | 97 void TearDown() override { |
98 mock_browsing_data_service_worker_helper_ = nullptr; | 98 mock_browsing_data_service_worker_helper_ = nullptr; |
99 mock_browsing_data_cache_storage_helper_ = nullptr; | 99 mock_browsing_data_cache_storage_helper_ = nullptr; |
100 mock_browsing_data_channel_id_helper_ = nullptr; | 100 mock_browsing_data_channel_id_helper_ = nullptr; |
101 mock_browsing_data_quota_helper_ = nullptr; | 101 mock_browsing_data_quota_helper_ = nullptr; |
102 mock_browsing_data_file_system_helper_ = nullptr; | 102 mock_browsing_data_file_system_helper_ = nullptr; |
103 mock_browsing_data_indexed_db_helper_ = nullptr; | 103 mock_browsing_data_indexed_db_helper_ = nullptr; |
(...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1647 mock_browsing_data_flash_lso_helper_.get()); | 1647 mock_browsing_data_flash_lso_helper_.get()); |
1648 CookiesTreeModel cookies_model(container, special_storage_policy()); | 1648 CookiesTreeModel cookies_model(container, special_storage_policy()); |
1649 | 1649 |
1650 mock_browsing_data_cookie_helper_-> | 1650 mock_browsing_data_cookie_helper_-> |
1651 AddCookieSamples(GURL(), "A=1"); | 1651 AddCookieSamples(GURL(), "A=1"); |
1652 mock_browsing_data_cookie_helper_->Notify(); | 1652 mock_browsing_data_cookie_helper_->Notify(); |
1653 EXPECT_EQ("A", GetDisplayedCookies(&cookies_model)); | 1653 EXPECT_EQ("A", GetDisplayedCookies(&cookies_model)); |
1654 } | 1654 } |
1655 | 1655 |
1656 } // namespace | 1656 } // namespace |
OLD | NEW |