👕 Remove linter errors

This commit is contained in:
Kevin Sawicki 2017-06-29 16:50:55 -07:00 committed by Aleksei Kuzmin
parent c7cf844bcd
commit 4bb95acc2b
6 changed files with 33 additions and 20 deletions

View file

@ -1245,18 +1245,20 @@ void WebContents::HasServiceWorker(
struct WrappedCallback {
base::Callback<void(bool)> callback_;
WrappedCallback(const base::Callback<void(bool)>& callback) : callback_(callback) {}
explicit WrappedCallback(const base::Callback<void(bool)>& callback)
: callback_(callback) {}
void Run(content::ServiceWorkerCapability capability) {
callback_.Run(capability != content::ServiceWorkerCapability::NO_SERVICE_WORKER);
callback_.Run(capability !=
content::ServiceWorkerCapability::NO_SERVICE_WORKER);
delete this;
}
};
auto wrapped_callback = new WrappedCallback(callback);
context->CheckHasServiceWorker(web_contents()->GetLastCommittedURL(),
GURL::EmptyGURL(),
base::Bind(&WrappedCallback::Run, base::Unretained(wrapped_callback)));
context->CheckHasServiceWorker(
web_contents()->GetLastCommittedURL(), GURL::EmptyGURL(),
base::Bind(&WrappedCallback::Run, base::Unretained(wrapped_callback)));
}
void WebContents::UnregisterServiceWorker(