Index: trunk/src/components/nacl/browser/nacl_browser.cc |
=================================================================== |
--- trunk/src/components/nacl/browser/nacl_browser.cc (revision 270923) |
+++ trunk/src/components/nacl/browser/nacl_browser.cc (working copy) |
@@ -272,17 +272,17 @@ |
CheckWaiting(); |
} |
-void NaClBrowser::SetProcessGdbDebugStubPort(int process_id, int port) { |
- gdb_debug_stub_port_map_[process_id] = port; |
- if (port != kGdbDebugStubPortUnknown && |
- !debug_stub_port_listener_.is_null()) { |
- content::BrowserThread::PostTask( |
- content::BrowserThread::IO, |
- FROM_HERE, |
- base::Bind(debug_stub_port_listener_, port)); |
- } |
+void NaClBrowser::FireGdbDebugStubPortOpened(int port) { |
+ content::BrowserThread::PostTask( |
+ content::BrowserThread::IO, |
+ FROM_HERE, |
+ base::Bind(debug_stub_port_listener_, port)); |
} |
+bool NaClBrowser::HasGdbDebugStubPortListener() { |
+ return !debug_stub_port_listener_.is_null(); |
+} |
+ |
void NaClBrowser::SetGdbDebugStubPortListener( |
base::Callback<void(int)> listener) { |
debug_stub_port_listener_ = listener; |
@@ -292,14 +292,6 @@ |
debug_stub_port_listener_.Reset(); |
} |
-int NaClBrowser::GetProcessGdbDebugStubPort(int process_id) { |
- GdbDebugStubPortMap::iterator i = gdb_debug_stub_port_map_.find(process_id); |
- if (i != gdb_debug_stub_port_map_.end()) { |
- return i->second; |
- } |
- return kGdbDebugStubPortUnused; |
-} |
- |
void NaClBrowser::InitValidationCacheFilePath() { |
// Determine where the validation cache resides in the file system. It |
// exists in Chrome's cache directory and is not tied to any specific |
@@ -542,10 +534,6 @@ |
validation_cache_is_modified_ = false; |
} |
-void NaClBrowser::OnProcessEnd(int process_id) { |
- gdb_debug_stub_port_map_.erase(process_id); |
-} |
- |
void NaClBrowser::OnProcessCrashed() { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
if (crash_times_.size() == kMaxCrashesPerInterval) { |