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

Unified Diff: content/common/service_worker/service_worker_client_info.cc

Issue 893783002: Revert of Gather the ServiceWorker client information in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rfh_getvisibilitystate
Patch Set: Created 5 years, 11 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/common/service_worker/service_worker_client_info.cc
diff --git a/content/common/service_worker/service_worker_client_info.cc b/content/common/service_worker/service_worker_client_info.cc
deleted file mode 100644
index 5662818cfa669a425ab15d160517ccb1f867ae32..0000000000000000000000000000000000000000
--- a/content/common/service_worker/service_worker_client_info.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2015 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/common/service_worker/service_worker_client_info.h"
-
-#include "base/logging.h"
-#include "content/common/service_worker/service_worker_types.h"
-
-namespace content {
-
-ServiceWorkerClientInfo::ServiceWorkerClientInfo()
- : client_id(kInvalidServiceWorkerClientId),
- page_visibility_state(blink::WebPageVisibilityStateLast),
- is_focused(false),
- frame_type(REQUEST_CONTEXT_FRAME_TYPE_LAST) {
-}
-
-ServiceWorkerClientInfo::ServiceWorkerClientInfo(
- blink::WebPageVisibilityState page_visibility_state,
- bool is_focused,
- const GURL& url,
- RequestContextFrameType frame_type)
- : client_id(kInvalidServiceWorkerClientId),
- page_visibility_state(page_visibility_state),
- is_focused(is_focused),
- url(url),
- frame_type(frame_type) {
-}
-
-bool ServiceWorkerClientInfo::IsEmpty() const {
- return page_visibility_state == blink::WebPageVisibilityStateLast &&
- is_focused == false &&
- url.is_empty() &&
- frame_type == REQUEST_CONTEXT_FRAME_TYPE_LAST;
-}
-
-bool ServiceWorkerClientInfo::IsValid() const {
- return !IsEmpty() && client_id != kInvalidServiceWorkerClientId;
-}
-
-} // namespace content
« no previous file with comments | « content/common/service_worker/service_worker_client_info.h ('k') | content/common/service_worker/service_worker_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698