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

Side by Side Diff: chrome/browser/extensions/test_blacklist.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/test_blacklist.h" 5 #include "chrome/browser/extensions/test_blacklist.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 15 matching lines...) Expand all
26 26
27 BlacklistStateFetcherMock::BlacklistStateFetcherMock() : request_count_(0) {} 27 BlacklistStateFetcherMock::BlacklistStateFetcherMock() : request_count_(0) {}
28 28
29 BlacklistStateFetcherMock::~BlacklistStateFetcherMock() {} 29 BlacklistStateFetcherMock::~BlacklistStateFetcherMock() {}
30 30
31 void BlacklistStateFetcherMock::Request(const std::string& id, 31 void BlacklistStateFetcherMock::Request(const std::string& id,
32 const RequestCallback& callback) { 32 const RequestCallback& callback) {
33 ++request_count_; 33 ++request_count_;
34 34
35 BlacklistState result = NOT_BLACKLISTED; 35 BlacklistState result = NOT_BLACKLISTED;
36 if (ContainsKey(states_, id)) 36 if (base::ContainsKey(states_, id))
37 result = states_[id]; 37 result = states_[id];
38 38
39 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 39 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
40 base::Bind(callback, result)); 40 base::Bind(callback, result));
41 } 41 }
42 42
43 void BlacklistStateFetcherMock::SetState(const std::string& id, 43 void BlacklistStateFetcherMock::SetState(const std::string& id,
44 BlacklistState state) { 44 BlacklistState state) {
45 states_[id] = state; 45 states_[id] = state;
46 } 46 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 void TestBlacklist::EnableSafeBrowsing() { 127 void TestBlacklist::EnableSafeBrowsing() {
128 blacklist_db_->Enable(); 128 blacklist_db_->Enable();
129 } 129 }
130 130
131 void TestBlacklist::NotifyUpdate() { 131 void TestBlacklist::NotifyUpdate() {
132 blacklist_db_->NotifyUpdate(); 132 blacklist_db_->NotifyUpdate();
133 } 133 }
134 134
135 } // namespace extensions 135 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698