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

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

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 years, 6 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/message_loop/message_loop.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h"
11 #include "base/thread_task_runner_handle.h"
10 #include "content/browser/service_worker/service_worker_context_core.h" 12 #include "content/browser/service_worker/service_worker_context_core.h"
11 #include "content/browser/service_worker/service_worker_job_coordinator.h" 13 #include "content/browser/service_worker/service_worker_job_coordinator.h"
12 #include "content/browser/service_worker/service_worker_metrics.h" 14 #include "content/browser/service_worker/service_worker_metrics.h"
13 #include "content/browser/service_worker/service_worker_registration.h" 15 #include "content/browser/service_worker/service_worker_registration.h"
14 #include "content/browser/service_worker/service_worker_storage.h" 16 #include "content/browser/service_worker/service_worker_storage.h"
15 #include "content/browser/service_worker/service_worker_utils.h" 17 #include "content/browser/service_worker/service_worker_utils.h"
16 #include "content/common/service_worker/service_worker_types.h" 18 #include "content/common/service_worker/service_worker_types.h"
17 #include "net/base/net_errors.h" 19 #include "net/base/net_errors.h"
18 20
19 namespace content { 21 namespace content {
20 22
21 namespace { 23 namespace {
22 24
23 void RunSoon(const base::Closure& closure) { 25 void RunSoon(const base::Closure& closure) {
24 base::MessageLoop::current()->PostTask(FROM_HERE, closure); 26 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
25 } 27 }
26 28
27 } // namespace 29 } // namespace
28 30
29 typedef ServiceWorkerRegisterJobBase::RegistrationJobType RegistrationJobType; 31 typedef ServiceWorkerRegisterJobBase::RegistrationJobType RegistrationJobType;
30 32
31 ServiceWorkerRegisterJob::ServiceWorkerRegisterJob( 33 ServiceWorkerRegisterJob::ServiceWorkerRegisterJob(
32 base::WeakPtr<ServiceWorkerContextCore> context, 34 base::WeakPtr<ServiceWorkerContextCore> context,
33 const GURL& pattern, 35 const GURL& pattern,
34 const GURL& script_url) 36 const GURL& script_url)
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 if (host->IsHostToRunningServiceWorker()) 567 if (host->IsHostToRunningServiceWorker())
566 continue; 568 continue;
567 if (!ServiceWorkerUtils::ScopeMatches(registration->pattern(), 569 if (!ServiceWorkerUtils::ScopeMatches(registration->pattern(),
568 host->document_url())) 570 host->document_url()))
569 continue; 571 continue;
570 host->AddMatchingRegistration(registration); 572 host->AddMatchingRegistration(registration);
571 } 573 }
572 } 574 }
573 575
574 } // namespace content 576 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698