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

Side by Side Diff: chrome/browser/nacl_host/nacl_broker_service_win.cc

Issue 8760011: Move the ProcessType enum out to its own file. This is in preparation for getting rid of ChildPro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/nacl_host/nacl_broker_service_win.h" 5 #include "chrome/browser/nacl_host/nacl_broker_service_win.h"
6 6
7 #include "chrome/browser/nacl_host/nacl_process_host.h" 7 #include "chrome/browser/nacl_host/nacl_process_host.h"
8 8
9 NaClBrokerService* NaClBrokerService::GetInstance() { 9 NaClBrokerService* NaClBrokerService::GetInstance() {
10 return Singleton<NaClBrokerService>::get(); 10 return Singleton<NaClBrokerService>::get();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void NaClBrokerService::OnLoaderDied() { 55 void NaClBrokerService::OnLoaderDied() {
56 --loaders_running_; 56 --loaders_running_;
57 // Stop the broker only if there are no loaders running or being launched. 57 // Stop the broker only if there are no loaders running or being launched.
58 NaClBrokerHost* broker_host = GetBrokerHost(); 58 NaClBrokerHost* broker_host = GetBrokerHost();
59 if (loaders_running_ + pending_launches_.size() == 0 && broker_host != NULL) { 59 if (loaders_running_ + pending_launches_.size() == 0 && broker_host != NULL) {
60 broker_host->StopBroker(); 60 broker_host->StopBroker();
61 } 61 }
62 } 62 }
63 63
64 NaClBrokerHost* NaClBrokerService::GetBrokerHost() { 64 NaClBrokerHost* NaClBrokerService::GetBrokerHost() {
65 BrowserChildProcessHost::Iterator iter(ChildProcessInfo::NACL_BROKER_PROCESS); 65 BrowserChildProcessHost::Iterator iter(content::PROCESS_TYPE_NACL_BROKER);
66 if (iter.Done()) 66 if (iter.Done())
67 return NULL; 67 return NULL;
68 NaClBrokerHost* broker_host = static_cast<NaClBrokerHost*>(*iter); 68 NaClBrokerHost* broker_host = static_cast<NaClBrokerHost*>(*iter);
69 return broker_host; 69 return broker_host;
70 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_broker_host_win.cc ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698