make_scoped_refptr --> WrapRefCounted

This commit is contained in:
Samuel Attard 2017-12-18 11:23:02 +11:00 committed by Aleksei Kuzmin
parent 4666879f94
commit 12066a60f3
11 changed files with 26 additions and 26 deletions

View file

@ -659,7 +659,7 @@ void App::OnLogin(LoginHandler* login_handler,
request_details,
login_handler->auth_info(),
base::Bind(&PassLoginInformation,
make_scoped_refptr(login_handler)));
WrapRefCounted(login_handler)));
}
// Default behavior is to always cancel the auth.

View file

@ -250,7 +250,7 @@ Cookies::~Cookies() {}
void Cookies::Get(const base::DictionaryValue& filter,
const GetCallback& callback) {
std::unique_ptr<base::DictionaryValue> copied(filter.CreateDeepCopy());
auto getter = make_scoped_refptr(request_context_getter_);
auto getter = WrapRefCounted(request_context_getter_);
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(GetCookiesOnIO, getter, Passed(&copied), callback));
@ -258,7 +258,7 @@ void Cookies::Get(const base::DictionaryValue& filter,
void Cookies::Remove(const GURL& url, const std::string& name,
const base::Closure& callback) {
auto getter = make_scoped_refptr(request_context_getter_);
auto getter = WrapRefCounted(request_context_getter_);
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(RemoveCookieOnIOThread, getter, url, name, callback));
@ -267,14 +267,14 @@ void Cookies::Remove(const GURL& url, const std::string& name,
void Cookies::Set(const base::DictionaryValue& details,
const SetCallback& callback) {
std::unique_ptr<base::DictionaryValue> copied(details.CreateDeepCopy());
auto getter = make_scoped_refptr(request_context_getter_);
auto getter = WrapRefCounted(request_context_getter_);
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(SetCookieOnIO, getter, Passed(&copied), callback));
}
void Cookies::FlushStore(const base::Closure& callback) {
auto getter = make_scoped_refptr(request_context_getter_);
auto getter = WrapRefCounted(request_context_getter_);
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(FlushCookieStoreOnIOThread, getter, callback));

View file

@ -498,7 +498,7 @@ template<Session::CacheAction action>
void Session::DoCacheAction(const net::CompletionCallback& callback) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&DoCacheActionInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
WrapRefCounted(browser_context_->GetRequestContext()),
action,
callback));
}
@ -591,7 +591,7 @@ void Session::SetCertVerifyProc(v8::Local<v8::Value> val,
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&SetCertVerifyProcInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
WrapRefCounted(browser_context_->GetRequestContext()),
proc));
}
@ -613,7 +613,7 @@ void Session::ClearHostResolverCache(mate::Arguments* args) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&ClearHostResolverCacheInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
WrapRefCounted(browser_context_->GetRequestContext()),
callback));
}
@ -629,14 +629,14 @@ void Session::ClearAuthCache(mate::Arguments* args) {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&ClearAuthCacheInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
WrapRefCounted(browser_context_->GetRequestContext()),
options, callback));
}
void Session::AllowNTLMCredentialsForDomains(const std::string& domains) {
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&AllowNTLMCredentialsForDomainsInIO,
make_scoped_refptr(browser_context_->GetRequestContext()),
WrapRefCounted(browser_context_->GetRequestContext()),
domains));
}