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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry.cc

Issue 2825003002: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/{a,b,c,d,e,f,g}* (Closed)
Patch Set: split rest of changes to 3 CLs 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/custom_handlers/protocol_handler_registry.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc
index 139fed6e4116e9bdbf43f373d54ef67b66fa1370..bc28906f58893addbf3a85ac83a5374254963379 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc
@@ -355,10 +355,9 @@ void ProtocolHandlerRegistry::ClearDefault(const std::string& scheme) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
default_handlers_.erase(scheme);
- BrowserThread::PostTask(
- BrowserThread::IO,
- FROM_HERE,
- base::Bind(&IOThreadDelegate::ClearDefault, io_thread_delegate_, scheme));
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+ base::BindOnce(&IOThreadDelegate::ClearDefault,
+ io_thread_delegate_, scheme));
Save();
NotifyChanged();
}
@@ -588,8 +587,8 @@ void ProtocolHandlerRegistry::RemoveHandler(
} else {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&IOThreadDelegate::ClearDefault, io_thread_delegate_,
- q->second.protocol()));
+ base::BindOnce(&IOThreadDelegate::ClearDefault, io_thread_delegate_,
+ q->second.protocol()));
default_handlers_.erase(q);
}
@@ -623,9 +622,8 @@ void ProtocolHandlerRegistry::Enable() {
}
enabled_ = true;
BrowserThread::PostTask(
- BrowserThread::IO,
- FROM_HERE,
- base::Bind(&IOThreadDelegate::Enable, io_thread_delegate_));
+ BrowserThread::IO, FROM_HERE,
+ base::BindOnce(&IOThreadDelegate::Enable, io_thread_delegate_));
ProtocolHandlerMap::const_iterator p;
for (p = default_handlers_.begin(); p != default_handlers_.end(); ++p) {
@@ -642,9 +640,8 @@ void ProtocolHandlerRegistry::Disable() {
}
enabled_ = false;
BrowserThread::PostTask(
- BrowserThread::IO,
- FROM_HERE,
- base::Bind(&IOThreadDelegate::Disable, io_thread_delegate_));
+ BrowserThread::IO, FROM_HERE,
+ base::BindOnce(&IOThreadDelegate::Disable, io_thread_delegate_));
ProtocolHandlerMap::const_iterator p;
for (p = default_handlers_.begin(); p != default_handlers_.end(); ++p) {
@@ -725,10 +722,9 @@ void ProtocolHandlerRegistry::SetDefault(const ProtocolHandler& handler) {
default_handlers_.erase(handler.protocol());
default_handlers_.insert(std::make_pair(handler.protocol(), handler));
PromoteHandler(handler);
- BrowserThread::PostTask(
- BrowserThread::IO,
- FROM_HERE,
- base::Bind(&IOThreadDelegate::SetDefault, io_thread_delegate_, handler));
+ BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+ base::BindOnce(&IOThreadDelegate::SetDefault,
+ io_thread_delegate_, handler));
}
void ProtocolHandlerRegistry::InsertHandler(const ProtocolHandler& handler) {

Powered by Google App Engine
This is Rietveld 408576698