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

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

Issue 12662019: Split the ProcessType enum into process types that content knows about (which will remain in src\co… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/common/chrome_process_type.h"
8 #include "content/public/browser/browser_child_process_host_iterator.h" 9 #include "content/public/browser/browser_child_process_host_iterator.h"
9 10
10 using content::BrowserChildProcessHostIterator; 11 using content::BrowserChildProcessHostIterator;
11 12
12 NaClBrokerService* NaClBrokerService::GetInstance() { 13 NaClBrokerService* NaClBrokerService::GetInstance() {
13 return Singleton<NaClBrokerService>::get(); 14 return Singleton<NaClBrokerService>::get();
14 } 15 }
15 16
16 NaClBrokerService::NaClBrokerService() 17 NaClBrokerService::NaClBrokerService()
17 : loaders_running_(0) { 18 : loaders_running_(0) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (pending_debuggers_.end() == it) 84 if (pending_debuggers_.end() == it)
84 NOTREACHED(); 85 NOTREACHED();
85 86
86 NaClProcessHost* client = it->second; 87 NaClProcessHost* client = it->second;
87 if (client) 88 if (client)
88 client->OnDebugExceptionHandlerLaunchedByBroker(success); 89 client->OnDebugExceptionHandlerLaunchedByBroker(success);
89 pending_debuggers_.erase(it); 90 pending_debuggers_.erase(it);
90 } 91 }
91 92
92 NaClBrokerHost* NaClBrokerService::GetBrokerHost() { 93 NaClBrokerHost* NaClBrokerService::GetBrokerHost() {
93 BrowserChildProcessHostIterator iter(content::PROCESS_TYPE_NACL_BROKER); 94 BrowserChildProcessHostIterator iter(PROCESS_TYPE_NACL_BROKER);
94 while (!iter.Done()) { 95 while (!iter.Done()) {
95 NaClBrokerHost* host = static_cast<NaClBrokerHost*>(iter.GetDelegate()); 96 NaClBrokerHost* host = static_cast<NaClBrokerHost*>(iter.GetDelegate());
96 if (!host->IsTerminating()) 97 if (!host->IsTerminating())
97 return host; 98 return host;
98 ++iter; 99 ++iter;
99 } 100 }
100 return NULL; 101 return NULL;
101 } 102 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698