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

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

Issue 2885017: Moved common parts of ChildProcessHost into chrome/common and created a Brows... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Code review changes Created 10 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/nacl_host/nacl_process_host.h" 8 #include "chrome/browser/nacl_host/nacl_process_host.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void NaClBrokerService::OnLoaderDied() { 65 void NaClBrokerService::OnLoaderDied() {
66 --loaders_running_; 66 --loaders_running_;
67 // Stop the broker only if there are no loaders running or being launched. 67 // Stop the broker only if there are no loaders running or being launched.
68 NaClBrokerHost* broker_host = GetBrokerHost(); 68 NaClBrokerHost* broker_host = GetBrokerHost();
69 if (loaders_running_ + pending_launches_.size() == 0 && broker_host != NULL) { 69 if (loaders_running_ + pending_launches_.size() == 0 && broker_host != NULL) {
70 broker_host->StopBroker(); 70 broker_host->StopBroker();
71 } 71 }
72 } 72 }
73 73
74 NaClBrokerHost* NaClBrokerService::GetBrokerHost() { 74 NaClBrokerHost* NaClBrokerService::GetBrokerHost() {
75 for (ChildProcessHost::Iterator iter(ChildProcessInfo::NACL_BROKER_PROCESS); 75 for (BrowserChildProcessHost::Iterator iter(
76 ChildProcessInfo::NACL_BROKER_PROCESS);
76 !iter.Done(); 77 !iter.Done();
77 ++iter) { 78 ++iter) {
78 NaClBrokerHost* broker_host = static_cast<NaClBrokerHost*>(*iter); 79 NaClBrokerHost* broker_host = static_cast<NaClBrokerHost*>(*iter);
79 return broker_host; 80 return broker_host;
80 } 81 }
81 return NULL; 82 return NULL;
82 } 83 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_broker_host_win.cc ('k') | chrome/browser/nacl_host/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698