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

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

Issue 182383008: Create chrome://serviceworker-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix GetInfo / const stuff Created 6 years, 10 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_registration.cc
diff --git a/content/browser/service_worker/service_worker_registration.cc b/content/browser/service_worker/service_worker_registration.cc
index e3a7e9597b40c9bddd14ccff7280eefea8818033..487d613b1a61e94a138c8e309d0eb0b644fee333 100644
--- a/content/browser/service_worker/service_worker_registration.cc
+++ b/content/browser/service_worker/service_worker_registration.cc
@@ -4,6 +4,7 @@
#include "content/browser/service_worker/service_worker_registration.h"
+#include "content/browser/service_worker/service_worker_info.h"
#include "content/public/browser/browser_thread.h"
namespace content {
@@ -35,6 +36,16 @@ void ServiceWorkerRegistration::Shutdown() {
is_shutdown_ = true;
}
+ServiceWorkerRegistrationInfo ServiceWorkerRegistration::GetInfo() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
+ return ServiceWorkerRegistrationInfo(
+ script_url(),
+ pattern(),
+ active_version_ ? ServiceWorkerVersionInfo() : active_version_->GetInfo(),
+ pending_version_ ? ServiceWorkerVersionInfo()
+ : pending_version_->GetInfo());
michaeln 2014/03/06 01:19:02 Did you run this code? It looks like it will crash
alecflett 2014/03/06 19:25:15 sorry last minute refactoring, good catch. Done.
+}
+
void ServiceWorkerRegistration::ActivatePendingVersion() {
active_version_->Shutdown();
active_version_ = pending_version_;

Powered by Google App Engine
This is Rietveld 408576698