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

Unified Diff: content/browser/service_worker/service_worker_internals_ui.cc

Issue 508433002: Remove implicit conversions from scoped_refptr to T* in content/browser/service_worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_internals_ui.cc
diff --git a/content/browser/service_worker/service_worker_internals_ui.cc b/content/browser/service_worker/service_worker_internals_ui.cc
index b833f201076a493c840a2d6572d5a66d66bfbea7..566f3ac5f7047815c4cc5687671d6935dad0e152 100644
--- a/content/browser/service_worker/service_worker_internals_ui.cc
+++ b/content/browser/service_worker/service_worker_internals_ui.cc
@@ -76,11 +76,11 @@ void CallServiceWorkerVersionMethodWithVersionID(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
scoped_refptr<ServiceWorkerVersion> version =
context->context()->GetLiveVersion(version_id);
- if (!version) {
+ if (!version.get()) {
callback.Run(SERVICE_WORKER_ERROR_NOT_FOUND);
return;
}
- (*version.*method)(callback);
+ (*version.get().*method)(callback);
}
void DispatchPushEventWithVersionID(
@@ -100,7 +100,7 @@ void DispatchPushEventWithVersionID(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
scoped_refptr<ServiceWorkerVersion> version =
context->context()->GetLiveVersion(version_id);
- if (!version) {
+ if (!version.get()) {
callback.Run(SERVICE_WORKER_ERROR_NOT_FOUND);
return;
}
@@ -625,7 +625,7 @@ void ServiceWorkerInternalsUI::InspectWorker(const ListValue* args) {
scoped_refptr<DevToolsAgentHostImpl> agent_host(
EmbeddedWorkerDevToolsManager::GetInstance()
->GetDevToolsAgentHostForWorker(process_id, devtools_agent_route_id));
- if (!agent_host) {
+ if (!agent_host.get()) {
callback.Run(SERVICE_WORKER_ERROR_NOT_FOUND);
return;
}

Powered by Google App Engine
This is Rietveld 408576698