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

Side by Side Diff: chrome/browser/extensions/test_blacklist.cc

Issue 2825963003: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/extensions (Closed)
Patch Set: Created 3 years, 8 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 18 matching lines...) Expand all
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 (base::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(
40 base::Bind(callback, result)); 40 FROM_HERE, base::BindOnce(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 }
47 47
48 void BlacklistStateFetcherMock::Clear() { 48 void BlacklistStateFetcherMock::Clear() {
49 states_.clear(); 49 states_.clear();
50 } 50 }
(...skipping 75 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
« no previous file with comments | « chrome/browser/extensions/startup_helper.cc ('k') | chrome/browser/extensions/test_extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698