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

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

Issue 1421483005: Reland: Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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_provider_host.h" 5 #include "content/browser/service_worker/service_worker_provider_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 render_thread_id_(kDocumentMainThreadId), 101 render_thread_id_(kDocumentMainThreadId),
102 provider_id_(provider_id), 102 provider_id_(provider_id),
103 provider_type_(provider_type), 103 provider_type_(provider_type),
104 context_(context), 104 context_(context),
105 dispatcher_host_(dispatcher_host), 105 dispatcher_host_(dispatcher_host),
106 allow_association_(true) { 106 allow_association_(true) {
107 DCHECK_NE(SERVICE_WORKER_PROVIDER_UNKNOWN, provider_type_); 107 DCHECK_NE(SERVICE_WORKER_PROVIDER_UNKNOWN, provider_type_);
108 DCHECK_NE(SERVICE_WORKER_PROVIDER_FOR_SANDBOXED_FRAME, provider_type_); 108 DCHECK_NE(SERVICE_WORKER_PROVIDER_FOR_SANDBOXED_FRAME, provider_type_);
109 109
110 // PlzNavigate 110 // PlzNavigate
111 CHECK_IMPLIES(render_process_id == ChildProcessHost::kInvalidUniqueID, 111 CHECK(render_process_id != ChildProcessHost::kInvalidUniqueID ||
112 base::CommandLine::ForCurrentProcess()->HasSwitch( 112 base::CommandLine::ForCurrentProcess()->HasSwitch(
113 switches::kEnableBrowserSideNavigation)); 113 switches::kEnableBrowserSideNavigation));
114 114
115 if (provider_type_ == SERVICE_WORKER_PROVIDER_FOR_CONTROLLER) { 115 if (provider_type_ == SERVICE_WORKER_PROVIDER_FOR_CONTROLLER) {
116 // Actual thread id is set when the service worker context gets started. 116 // Actual thread id is set when the service worker context gets started.
117 render_thread_id_ = kInvalidEmbeddedWorkerThreadId; 117 render_thread_id_ = kInvalidEmbeddedWorkerThreadId;
118 } 118 }
119 context_->RegisterProviderHostByClientID(client_uuid_, this); 119 context_->RegisterProviderHostByClientID(client_uuid_, this);
120 } 120 }
121 121
122 ServiceWorkerProviderHost::~ServiceWorkerProviderHost() { 122 ServiceWorkerProviderHost::~ServiceWorkerProviderHost() {
123 if (context_) 123 if (context_)
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 Send(new ServiceWorkerMsg_SetControllerServiceWorker( 728 Send(new ServiceWorkerMsg_SetControllerServiceWorker(
729 render_thread_id_, provider_id(), 729 render_thread_id_, provider_id(),
730 GetOrCreateServiceWorkerHandle( 730 GetOrCreateServiceWorkerHandle(
731 associated_registration_->active_version()), 731 associated_registration_->active_version()),
732 false /* shouldNotifyControllerChange */)); 732 false /* shouldNotifyControllerChange */));
733 } 733 }
734 } 734 }
735 } 735 }
736 736
737 } // namespace content 737 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698