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

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

Issue 182383008: Create chrome://serviceworker-internals (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ServiceWorker*Info classes 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_info.cc
diff --git a/content/browser/service_worker/service_worker_info.cc b/content/browser/service_worker/service_worker_info.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fff7a5b13a0cae88d5cbd4cb2392fa7257f105fc
--- /dev/null
+++ b/content/browser/service_worker/service_worker_info.cc
@@ -0,0 +1,46 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/service_worker/service_worker_info.h"
+
+namespace content {
+
+ServiceWorkerVersionInfo::ServiceWorkerVersionInfo()
+ : is_null_(true),
+ status_(ServiceWorkerVersion::STOPPED),
+ process_id_(-1),
+ thread_id_(-1) {}
+
+ServiceWorkerVersionInfo::ServiceWorkerVersionInfo(
+ ServiceWorkerVersion::Status status,
+ int process_id,
+ int thread_id)
+ : is_null_(false),
+ status_(status),
+ process_id_(process_id),
+ thread_id_(thread_id) {}
+ServiceWorkerVersionInfo::~ServiceWorkerVersionInfo() {}
+
+ServiceWorkerRegistrationInfo::ServiceWorkerRegistrationInfo(
+ const GURL& script_url,
+ const GURL& pattern,
+ const ServiceWorkerVersionInfo& active_version,
+ const ServiceWorkerVersionInfo& pending_version)
+ : script_url_(script_url),
+ pattern_(pattern),
+ active_version_(active_version),
+ pending_version_(pending_version) {}
+
+ServiceWorkerRegistrationInfo& ServiceWorkerRegistrationInfo::operator=(
+ const ServiceWorkerRegistrationInfo& other) {
+ script_url_ = other.script_url_;
+ pattern_ = other.pattern_;
+ active_version_ = other.active_version_;
+ pending_version_ = other.pending_version_;
+ return *this;
+}
+
+ServiceWorkerRegistrationInfo::~ServiceWorkerRegistrationInfo() {}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698