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

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

Issue 2223413002: ServiceWorker: DCHECK is changed to CHECK to track the failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO comment Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <utility> 7 #include <utility>
8 8
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return; 275 return;
276 276
277 // Disassociation message should be sent only for controllees. 277 // Disassociation message should be sent only for controllees.
278 DCHECK(IsProviderForClient()); 278 DCHECK(IsProviderForClient());
279 Send(new ServiceWorkerMsg_DisassociateRegistration( 279 Send(new ServiceWorkerMsg_DisassociateRegistration(
280 render_thread_id_, provider_id())); 280 render_thread_id_, provider_id()));
281 } 281 }
282 282
283 void ServiceWorkerProviderHost::AddMatchingRegistration( 283 void ServiceWorkerProviderHost::AddMatchingRegistration(
284 ServiceWorkerRegistration* registration) { 284 ServiceWorkerRegistration* registration) {
285 DCHECK(ServiceWorkerUtils::ScopeMatches( 285 // TODO(shimazu): Change CHECK to DCHECK after https://crbug.com/634222 is
286 registration->pattern(), document_url_)); 286 // fixed.
287 CHECK(
288 ServiceWorkerUtils::ScopeMatches(registration->pattern(), document_url_));
287 if (!IsContextSecureForServiceWorker()) 289 if (!IsContextSecureForServiceWorker())
288 return; 290 return;
289 size_t key = registration->pattern().spec().size(); 291 size_t key = registration->pattern().spec().size();
290 if (ContainsKey(matching_registrations_, key)) 292 if (ContainsKey(matching_registrations_, key))
291 return; 293 return;
292 IncreaseProcessReference(registration->pattern()); 294 IncreaseProcessReference(registration->pattern());
293 registration->AddListener(this); 295 registration->AddListener(this);
294 matching_registrations_[key] = registration; 296 matching_registrations_[key] = registration;
295 ReturnRegistrationForReadyIfNeeded(); 297 ReturnRegistrationForReadyIfNeeded();
296 } 298 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 Send(new ServiceWorkerMsg_SetControllerServiceWorker( 665 Send(new ServiceWorkerMsg_SetControllerServiceWorker(
664 render_thread_id_, provider_id(), 666 render_thread_id_, provider_id(),
665 GetOrCreateServiceWorkerHandle( 667 GetOrCreateServiceWorkerHandle(
666 associated_registration_->active_version()), 668 associated_registration_->active_version()),
667 false /* shouldNotifyControllerChange */)); 669 false /* shouldNotifyControllerChange */));
668 } 670 }
669 } 671 }
670 } 672 }
671 673
672 } // namespace content 674 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698