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

Side by Side Diff: components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc

Issue 2838063002: [on-hold][subresource_filter] Add ActivationTracker to track all activated contents (Closed)
Patch Set: fix incognito Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h" 5 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 void WhitelistByContentSettings(const GURL& url) override {} 202 void WhitelistByContentSettings(const GURL& url) override {}
203 void WhitelistInCurrentWebContents(const GURL& url) override { 203 void WhitelistInCurrentWebContents(const GURL& url) override {
204 if (url.SchemeIsHTTPOrHTTPS()) 204 if (url.SchemeIsHTTPOrHTTPS())
205 whitelisted_hosts_.insert(url.host()); 205 whitelisted_hosts_.insert(url.host());
206 } 206 }
207 207
208 VerifiedRulesetDealer::Handle* GetRulesetDealer() override { 208 VerifiedRulesetDealer::Handle* GetRulesetDealer() override {
209 return ruleset_dealer_; 209 return ruleset_dealer_;
210 } 210 }
211 211
212 void OnPageActivated(const ActivationState& state) override {}
213
212 MOCK_METHOD1(ToggleNotificationVisibility, void(bool)); 214 MOCK_METHOD1(ToggleNotificationVisibility, void(bool));
213 215
214 private: 216 private:
215 std::set<std::string> whitelisted_hosts_; 217 std::set<std::string> whitelisted_hosts_;
216 // Owned by the test harness. 218 // Owned by the test harness.
217 VerifiedRulesetDealer::Handle* ruleset_dealer_; 219 VerifiedRulesetDealer::Handle* ruleset_dealer_;
218 220
219 DISALLOW_COPY_AND_ASSIGN(MockSubresourceFilterClient); 221 DISALLOW_COPY_AND_ASSIGN(MockSubresourceFilterClient);
220 }; 222 };
221 223
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 ActivationScopeTest, 887 ActivationScopeTest,
886 ContentSubresourceFilterDriverFactoryActivationScopeTest, 888 ContentSubresourceFilterDriverFactoryActivationScopeTest,
887 ::testing::ValuesIn(kActivationScopeTestData)); 889 ::testing::ValuesIn(kActivationScopeTestData));
888 890
889 INSTANTIATE_TEST_CASE_P( 891 INSTANTIATE_TEST_CASE_P(
890 ActivationLevelTest, 892 ActivationLevelTest,
891 ContentSubresourceFilterDriverFactoryActivationLevelTest, 893 ContentSubresourceFilterDriverFactoryActivationLevelTest,
892 ::testing::ValuesIn(kActivationLevelTestData)); 894 ::testing::ValuesIn(kActivationLevelTestData));
893 895
894 } // namespace subresource_filter 896 } // namespace subresource_filter
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698