 Chromium Code Reviews
 Chromium Code Reviews Issue 11236025:
  Test that debug stub works with browser.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src/
    
  
    Issue 11236025:
  Test that debug stub works with browser.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src/| OLD | NEW | 
|---|---|
| 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 #ifndef CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 
| 6 #define CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 6 #define CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 
| 7 | 7 | 
| 8 #include "base/bind.h" | 8 #include "base/bind.h" | 
| 9 #include "base/file_util_proxy.h" | 9 #include "base/file_util_proxy.h" | 
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 45 | 45 | 
| 46 // IRT file handle, only available when IsReady(). | 46 // IRT file handle, only available when IsReady(). | 
| 47 base::PlatformFile IrtFile() const; | 47 base::PlatformFile IrtFile() const; | 
| 48 | 48 | 
| 49 // Set match patterns which will be checked before enabling debug stub. | 49 // Set match patterns which will be checked before enabling debug stub. | 
| 50 void SetDebugPatterns(std::string debug_patterns); | 50 void SetDebugPatterns(std::string debug_patterns); | 
| 51 | 51 | 
| 52 // Returns whether NaCl application with this manifest URL should be debugged. | 52 // Returns whether NaCl application with this manifest URL should be debugged. | 
| 53 bool URLMatchesDebugPatterns(GURL manifest_url); | 53 bool URLMatchesDebugPatterns(GURL manifest_url); | 
| 54 | 54 | 
| 55 // Methods for testing GDB debug stub in browser. If test adds debug stub | |
| 56 // port listener, chrome will open ephemeral port for debug stub server | |
| 
Mark Seaborn
2012/12/05 18:00:47
'chrome' -> 'Chrome'.
I don't think "ephemeral" i
 
halyavin
2012/12/06 15:35:01
Done.
 | |
| 57 // instead of fixed one. | |
| 
Mark Seaborn
2012/12/05 18:00:47
"a fixed one"
 
halyavin
2012/12/06 15:35:01
Done.
 | |
| 58 | |
| 59 // Notify listener that new debug stub TCP port is allocated. | |
| 60 void FireGdbDebugStubPortOpened(int port); | |
| 61 bool HasGdbDebugStubPortListener(); | |
| 62 void SetGdbDebugStubPortListener(base::Callback<void(int)> listener); | |
| 63 void ClearGdbDebugStubPortListener(); | |
| 64 | |
| 55 bool ValidationCacheIsEnabled() const { | 65 bool ValidationCacheIsEnabled() const { | 
| 56 return validation_cache_is_enabled_; | 66 return validation_cache_is_enabled_; | 
| 57 } | 67 } | 
| 58 | 68 | 
| 59 const std::string& GetValidationCacheKey() const { | 69 const std::string& GetValidationCacheKey() const { | 
| 60 return validation_cache_.GetValidationCacheKey(); | 70 return validation_cache_.GetValidationCacheKey(); | 
| 61 } | 71 } | 
| 62 | 72 | 
| 63 bool QueryKnownToValidate(const std::string& signature, bool off_the_record); | 73 bool QueryKnownToValidate(const std::string& signature, bool off_the_record); | 
| 64 void SetKnownToValidate(const std::string& signature, bool off_the_record); | 74 void SetKnownToValidate(const std::string& signature, bool off_the_record); | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 FilePath irt_filepath_; | 114 FilePath irt_filepath_; | 
| 105 NaClResourceState irt_state_; | 115 NaClResourceState irt_state_; | 
| 106 std::vector<URLPattern> debug_patterns_; | 116 std::vector<URLPattern> debug_patterns_; | 
| 107 bool inverse_debug_patterns_; | 117 bool inverse_debug_patterns_; | 
| 108 NaClValidationCache validation_cache_; | 118 NaClValidationCache validation_cache_; | 
| 109 NaClValidationCache off_the_record_validation_cache_; | 119 NaClValidationCache off_the_record_validation_cache_; | 
| 110 FilePath validation_cache_file_path_; | 120 FilePath validation_cache_file_path_; | 
| 111 bool validation_cache_is_enabled_; | 121 bool validation_cache_is_enabled_; | 
| 112 bool validation_cache_is_modified_; | 122 bool validation_cache_is_modified_; | 
| 113 NaClResourceState validation_cache_state_; | 123 NaClResourceState validation_cache_state_; | 
| 124 base::Callback<void(int)> debug_stub_port_listener_; | |
| 114 | 125 | 
| 115 bool ok_; | 126 bool ok_; | 
| 116 | 127 | 
| 117 // A list of pending tasks to start NaCl processes. | 128 // A list of pending tasks to start NaCl processes. | 
| 118 std::vector<base::Closure> waiting_; | 129 std::vector<base::Closure> waiting_; | 
| 119 | 130 | 
| 120 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); | 131 DISALLOW_COPY_AND_ASSIGN(NaClBrowser); | 
| 121 }; | 132 }; | 
| 122 | 133 | 
| 123 #endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 134 #endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_H_ | 
| OLD | NEW |