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

Side by Side Diff: content/browser/devtools/service_worker_devtools_manager.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/devtools/service_worker_devtools_manager.h" 5 #include "content/browser/devtools/service_worker_devtools_manager.h"
6 6
7 #include "content/browser/devtools/service_worker_devtools_agent_host.h" 7 #include "content/browser/devtools/service_worker_devtools_agent_host.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 #include "content/public/browser/render_process_host.h" 9 #include "content/public/browser/render_process_host.h"
10 #include "content/public/browser/worker_service.h" 10 #include "content/public/browser/worker_service.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 bool ServiceWorkerDevToolsManager::ServiceWorkerIdentifier::Matches( 38 bool ServiceWorkerDevToolsManager::ServiceWorkerIdentifier::Matches(
39 const ServiceWorkerIdentifier& other) const { 39 const ServiceWorkerIdentifier& other) const {
40 return context_ == other.context_ && version_id_ == other.version_id_; 40 return context_ == other.context_ && version_id_ == other.version_id_;
41 } 41 }
42 42
43 // static 43 // static
44 ServiceWorkerDevToolsManager* ServiceWorkerDevToolsManager::GetInstance() { 44 ServiceWorkerDevToolsManager* ServiceWorkerDevToolsManager::GetInstance() {
45 DCHECK_CURRENTLY_ON(BrowserThread::UI); 45 DCHECK_CURRENTLY_ON(BrowserThread::UI);
46 return Singleton<ServiceWorkerDevToolsManager>::get(); 46 return base::Singleton<ServiceWorkerDevToolsManager>::get();
47 } 47 }
48 48
49 DevToolsAgentHostImpl* 49 DevToolsAgentHostImpl*
50 ServiceWorkerDevToolsManager::GetDevToolsAgentHostForWorker( 50 ServiceWorkerDevToolsManager::GetDevToolsAgentHostForWorker(
51 int worker_process_id, 51 int worker_process_id,
52 int worker_route_id) { 52 int worker_route_id) {
53 AgentHostMap::iterator it = workers_.find( 53 AgentHostMap::iterator it = workers_.find(
54 WorkerId(worker_process_id, worker_route_id)); 54 WorkerId(worker_process_id, worker_route_id));
55 return it == workers_.end() ? NULL : it->second; 55 return it == workers_.end() ? NULL : it->second;
56 } 56 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 break; 175 break;
176 } 176 }
177 return it; 177 return it;
178 } 178 }
179 179
180 void ServiceWorkerDevToolsManager::ResetForTesting() { 180 void ServiceWorkerDevToolsManager::ResetForTesting() {
181 workers_.clear(); 181 workers_.clear();
182 } 182 }
183 183
184 } // namespace content 184 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/service_worker_devtools_manager.h ('k') | content/browser/devtools/shared_worker_devtools_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698