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

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

Issue 11236025: Test that debug stub works with browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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
« no previous file with comments | « chrome/browser/nacl_host/nacl_browser.h ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_browser.h" 5 #include "chrome/browser/nacl_host/nacl_browser.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 break; 251 break;
252 } 252 }
253 } 253 }
254 if (inverse_debug_patterns_) { 254 if (inverse_debug_patterns_) {
255 return !matches; 255 return !matches;
256 } else { 256 } else {
257 return matches; 257 return matches;
258 } 258 }
259 } 259 }
260 260
261 void NaClBrowser::FireGdbDebugStubPortOpened(int port) {
262 content::BrowserThread::PostTask(
263 content::BrowserThread::IO,
264 FROM_HERE,
265 base::Bind(debug_stub_port_listener_, port));
266 }
267
268 bool NaClBrowser::HasGdbDebugStubPortListener() {
269 return !debug_stub_port_listener_.is_null();
270 }
271
272 void NaClBrowser::SetGdbDebugStubPortListener(
273 base::Callback<void(int)> listener) {
274 debug_stub_port_listener_ = listener;
275 }
276
277 void NaClBrowser::ClearGdbDebugStubPortListener() {
278 debug_stub_port_listener_.Reset();
279 }
280
261 void NaClBrowser::InitValidationCacheFilePath() { 281 void NaClBrowser::InitValidationCacheFilePath() {
262 // Determine where the validation cache resides in the file system. It 282 // Determine where the validation cache resides in the file system. It
263 // exists in Chrome's cache directory and is not tied to any specific 283 // exists in Chrome's cache directory and is not tied to any specific
264 // profile. 284 // profile.
265 // Start by finding the user data directory. 285 // Start by finding the user data directory.
266 FilePath user_data_dir; 286 FilePath user_data_dir;
267 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { 287 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
268 RunWithoutValidationCache(); 288 RunWithoutValidationCache();
269 return; 289 return;
270 } 290 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 // because it can degrade the responsiveness of the browser. 468 // because it can degrade the responsiveness of the browser.
449 // The task is sequenced so that multiple writes happen in order. 469 // The task is sequenced so that multiple writes happen in order.
450 content::BrowserThread::PostBlockingPoolSequencedTask( 470 content::BrowserThread::PostBlockingPoolSequencedTask(
451 kValidationCacheSequenceName, 471 kValidationCacheSequenceName,
452 FROM_HERE, 472 FROM_HERE,
453 base::Bind(WriteCache, validation_cache_file_path_, 473 base::Bind(WriteCache, validation_cache_file_path_,
454 base::Owned(pickle))); 474 base::Owned(pickle)));
455 } 475 }
456 validation_cache_is_modified_ = false; 476 validation_cache_is_modified_ = false;
457 } 477 }
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_browser.h ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698