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

Side by Side Diff: content/browser/service_worker/service_worker_version.cc

Issue 1005683003: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[q-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/service_worker/service_worker_version.h" 5 #include "content/browser/service_worker/service_worker_version.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 FOR_EACH_OBSERVER(Listener, listeners_, OnVersionStateChanged(this)); 357 FOR_EACH_OBSERVER(Listener, listeners_, OnVersionStateChanged(this));
358 } 358 }
359 359
360 void ServiceWorkerVersion::RegisterStatusChangeCallback( 360 void ServiceWorkerVersion::RegisterStatusChangeCallback(
361 const base::Closure& callback) { 361 const base::Closure& callback) {
362 status_change_callbacks_.push_back(callback); 362 status_change_callbacks_.push_back(callback);
363 } 363 }
364 364
365 ServiceWorkerVersionInfo ServiceWorkerVersion::GetInfo() { 365 ServiceWorkerVersionInfo ServiceWorkerVersion::GetInfo() {
366 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 366 DCHECK_CURRENTLY_ON(BrowserThread::IO);
367 return ServiceWorkerVersionInfo( 367 return ServiceWorkerVersionInfo(
368 running_status(), status(), script_url(), registration_id(), version_id(), 368 running_status(), status(), script_url(), registration_id(), version_id(),
369 embedded_worker()->process_id(), embedded_worker()->thread_id(), 369 embedded_worker()->process_id(), embedded_worker()->thread_id(),
370 embedded_worker()->worker_devtools_agent_route_id()); 370 embedded_worker()->worker_devtools_agent_route_id());
371 } 371 }
372 372
373 void ServiceWorkerVersion::StartWorker(const StatusCallback& callback) { 373 void ServiceWorkerVersion::StartWorker(const StatusCallback& callback) {
374 StartWorker(false, callback); 374 StartWorker(false, callback);
375 } 375 }
376 376
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 int request_id) { 1621 int request_id) {
1622 callbacks->Remove(request_id); 1622 callbacks->Remove(request_id);
1623 if (is_doomed_) { 1623 if (is_doomed_) {
1624 // The stop should be already scheduled, but try to stop immediately, in 1624 // The stop should be already scheduled, but try to stop immediately, in
1625 // order to release worker resources soon. 1625 // order to release worker resources soon.
1626 StopWorkerIfIdle(); 1626 StopWorkerIfIdle();
1627 } 1627 }
1628 } 1628 }
1629 1629
1630 } // namespace content 1630 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_registration.cc ('k') | content/browser/shared_worker/shared_worker_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698