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

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

Issue 1259213002: Move Service Worker %2f path validation logic from browser into Blink (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remaining nits. Created 5 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
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_register_job.h" 5 #include "content/browser/service_worker/service_worker_register_job.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 #include "content/browser/service_worker/service_worker_context_core.h" 12 #include "content/browser/service_worker/service_worker_context_core.h"
13 #include "content/browser/service_worker/service_worker_job_coordinator.h" 13 #include "content/browser/service_worker/service_worker_job_coordinator.h"
14 #include "content/browser/service_worker/service_worker_metrics.h" 14 #include "content/browser/service_worker/service_worker_metrics.h"
15 #include "content/browser/service_worker/service_worker_registration.h" 15 #include "content/browser/service_worker/service_worker_registration.h"
16 #include "content/browser/service_worker/service_worker_storage.h" 16 #include "content/browser/service_worker/service_worker_storage.h"
17 #include "content/browser/service_worker/service_worker_utils.h"
18 #include "content/common/service_worker/service_worker_types.h" 17 #include "content/common/service_worker/service_worker_types.h"
18 #include "content/common/service_worker/service_worker_utils.h"
19 #include "net/base/net_errors.h" 19 #include "net/base/net_errors.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 namespace { 23 namespace {
24 24
25 void RunSoon(const base::Closure& closure) { 25 void RunSoon(const base::Closure& closure) {
26 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure); 26 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
27 } 27 }
28 28
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 if (host->IsHostToRunningServiceWorker()) 524 if (host->IsHostToRunningServiceWorker())
525 continue; 525 continue;
526 if (!ServiceWorkerUtils::ScopeMatches(registration->pattern(), 526 if (!ServiceWorkerUtils::ScopeMatches(registration->pattern(),
527 host->document_url())) 527 host->document_url()))
528 continue; 528 continue;
529 host->AddMatchingRegistration(registration); 529 host->AddMatchingRegistration(registration);
530 } 530 }
531 } 531 }
532 532
533 } // namespace content 533 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698