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

Side by Side Diff: content/browser/shared_worker/shared_worker_service_impl.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/shared_worker/shared_worker_service_impl.h" 5 #include "content/browser/shared_worker/shared_worker_service_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 const bool is_new_worker_; 214 const bool is_new_worker_;
215 const SharedWorkerInstance instance_; 215 const SharedWorkerInstance instance_;
216 }; 216 };
217 217
218 // static 218 // static
219 bool (*SharedWorkerServiceImpl::s_try_increment_worker_ref_count_)(int) = 219 bool (*SharedWorkerServiceImpl::s_try_increment_worker_ref_count_)(int) =
220 TryIncrementWorkerRefCount; 220 TryIncrementWorkerRefCount;
221 221
222 SharedWorkerServiceImpl* SharedWorkerServiceImpl::GetInstance() { 222 SharedWorkerServiceImpl* SharedWorkerServiceImpl::GetInstance() {
223 DCHECK_CURRENTLY_ON(BrowserThread::IO); 223 DCHECK_CURRENTLY_ON(BrowserThread::IO);
224 return Singleton<SharedWorkerServiceImpl>::get(); 224 return base::Singleton<SharedWorkerServiceImpl>::get();
225 } 225 }
226 226
227 SharedWorkerServiceImpl::SharedWorkerServiceImpl() 227 SharedWorkerServiceImpl::SharedWorkerServiceImpl()
228 : update_worker_dependency_(UpdateWorkerDependency), 228 : update_worker_dependency_(UpdateWorkerDependency),
229 next_pending_instance_id_(0) { 229 next_pending_instance_id_(0) {
230 } 230 }
231 231
232 SharedWorkerServiceImpl::~SharedWorkerServiceImpl() {} 232 SharedWorkerServiceImpl::~SharedWorkerServiceImpl() {}
233 233
234 void SharedWorkerServiceImpl::ResetForTesting() { 234 void SharedWorkerServiceImpl::ResetForTesting() {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 UpdateWorkerDependencyFunc new_func) { 660 UpdateWorkerDependencyFunc new_func) {
661 update_worker_dependency_ = new_func; 661 update_worker_dependency_ = new_func;
662 } 662 }
663 663
664 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting( 664 void SharedWorkerServiceImpl::ChangeTryIncrementWorkerRefCountFuncForTesting(
665 bool (*new_func)(int)) { 665 bool (*new_func)(int)) {
666 s_try_increment_worker_ref_count_ = new_func; 666 s_try_increment_worker_ref_count_ = new_func;
667 } 667 }
668 668
669 } // namespace content 669 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/shared_worker/shared_worker_service_impl.h ('k') | content/browser/signed_certificate_timestamp_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698