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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/declarative_content_is_bookmarked_condition_tracker_unittest.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/api/declarative_content/declarative_content_ is_bookmarked_condition_tracker.h" 5 #include "chrome/browser/extensions/api/declarative_content/declarative_content_ is_bookmarked_condition_tracker.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 class Delegate : public ContentPredicateEvaluator::Delegate { 75 class Delegate : public ContentPredicateEvaluator::Delegate {
76 public: 76 public:
77 Delegate() {} 77 Delegate() {}
78 78
79 std::set<content::WebContents*>& evaluation_requests() { 79 std::set<content::WebContents*>& evaluation_requests() {
80 return evaluation_requests_; 80 return evaluation_requests_;
81 } 81 }
82 82
83 // ContentPredicateEvaluator::Delegate: 83 // ContentPredicateEvaluator::Delegate:
84 void RequestEvaluation(content::WebContents* contents) override { 84 void RequestEvaluation(content::WebContents* contents) override {
85 EXPECT_FALSE(ContainsKey(evaluation_requests_, contents)); 85 EXPECT_FALSE(base::ContainsKey(evaluation_requests_, contents));
86 evaluation_requests_.insert(contents); 86 evaluation_requests_.insert(contents);
87 } 87 }
88 88
89 bool ShouldManageConditionsForBrowserContext( 89 bool ShouldManageConditionsForBrowserContext(
90 content::BrowserContext* context) override { 90 content::BrowserContext* context) override {
91 return true; 91 return true;
92 } 92 }
93 93
94 private: 94 private:
95 std::set<content::WebContents*> evaluation_requests_; 95 std::set<content::WebContents*> evaluation_requests_;
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 tracker_->OnWebContentsNavigation(tabs[0].get(), 426 tracker_->OnWebContentsNavigation(tabs[0].get(),
427 content::LoadCommittedDetails(), 427 content::LoadCommittedDetails(),
428 content::FrameNavigateParams()); 428 content::FrameNavigateParams());
429 EXPECT_THAT(delegate_.evaluation_requests(), 429 EXPECT_THAT(delegate_.evaluation_requests(),
430 UnorderedElementsAre(tabs[0].get())); 430 UnorderedElementsAre(tabs[0].get()));
431 EXPECT_TRUE(CheckPredicates(tabs[0].get(), false)); 431 EXPECT_TRUE(CheckPredicates(tabs[0].get(), false));
432 EXPECT_TRUE(CheckPredicates(tabs[1].get(), false)); 432 EXPECT_TRUE(CheckPredicates(tabs[1].get(), false));
433 } 433 }
434 434
435 } // namespace extensions 435 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698