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

Unified Diff: components/nacl/browser/nacl_browser.cc

Issue 286143010: Remove knowledge of nacl from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/browser/nacl_browser.h ('k') | components/nacl/browser/nacl_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/nacl_browser.cc
diff --git a/components/nacl/browser/nacl_browser.cc b/components/nacl/browser/nacl_browser.cc
index 84e710f84fcbecb7774a470b75fde934b8e49ef9..b10e2e1e077b7df582b6418ad026956842ffc8e8 100644
--- a/components/nacl/browser/nacl_browser.cc
+++ b/components/nacl/browser/nacl_browser.cc
@@ -272,15 +272,15 @@ void NaClBrowser::OnIrtOpened(scoped_ptr<base::FileProxy> file_proxy,
CheckWaiting();
}
-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::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::SetGdbDebugStubPortListener(
@@ -292,6 +292,14 @@ void NaClBrowser::ClearGdbDebugStubPortListener() {
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
@@ -534,6 +542,10 @@ void NaClBrowser::PersistValidationCache() {
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) {
« no previous file with comments | « components/nacl/browser/nacl_browser.h ('k') | components/nacl/browser/nacl_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698