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

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

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: 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_context_wrapper.h" 5 #include "content/browser/service_worker/service_worker_context_wrapper.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 ServiceWorkerRequestHandler* handler = 94 ServiceWorkerRequestHandler* handler =
95 ServiceWorkerRequestHandler::GetHandler(request); 95 ServiceWorkerRequestHandler::GetHandler(request);
96 if (!handler || !handler->context()) 96 if (!handler || !handler->context())
97 return nullptr; 97 return nullptr;
98 return handler->context()->wrapper_; 98 return handler->context()->wrapper_;
99 } 99 }
100 100
101 ServiceWorkerContextWrapper::ServiceWorkerContextWrapper( 101 ServiceWorkerContextWrapper::ServiceWorkerContextWrapper(
102 BrowserContext* browser_context) 102 BrowserContext* browser_context)
103 : observer_list_( 103 : observer_list_(
104 new ObserverListThreadSafe<ServiceWorkerContextObserver>()), 104 new base::ObserverListThreadSafe<ServiceWorkerContextObserver>()),
105 process_manager_(new ServiceWorkerProcessManager(browser_context)), 105 process_manager_(new ServiceWorkerProcessManager(browser_context)),
106 is_incognito_(false), 106 is_incognito_(false),
107 storage_partition_(nullptr) { 107 storage_partition_(nullptr) {
108 DCHECK_CURRENTLY_ON(BrowserThread::UI); 108 DCHECK_CURRENTLY_ON(BrowserThread::UI);
109 } 109 }
110 110
111 ServiceWorkerContextWrapper::~ServiceWorkerContextWrapper() { 111 ServiceWorkerContextWrapper::~ServiceWorkerContextWrapper() {
112 } 112 }
113 113
114 void ServiceWorkerContextWrapper::Init( 114 void ServiceWorkerContextWrapper::Init(
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 observer_list_->Notify(FROM_HERE, 641 observer_list_->Notify(FROM_HERE,
642 &ServiceWorkerContextObserver::OnStorageWiped); 642 &ServiceWorkerContextObserver::OnStorageWiped);
643 } 643 }
644 644
645 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() { 645 ServiceWorkerContextCore* ServiceWorkerContextWrapper::context() {
646 DCHECK_CURRENTLY_ON(BrowserThread::IO); 646 DCHECK_CURRENTLY_ON(BrowserThread::IO);
647 return context_core_.get(); 647 return context_core_.get();
648 } 648 }
649 649
650 } // namespace content 650 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698