| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include "app/clipboard/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 | 467 |
| 468 // Finally, tell the renderers which don't derive from ChildProcess. | 468 // Finally, tell the renderers which don't derive from ChildProcess. |
| 469 // Messages to the renderers must be done on the UI (main) thread. | 469 // Messages to the renderers must be done on the UI (main) thread. |
| 470 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); | 470 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); |
| 471 !i.IsAtEnd(); i.Advance()) | 471 !i.IsAtEnd(); i.Advance()) |
| 472 i.GetCurrentValue()->Send(new ViewMsg_SetIPCLoggingEnabled(enable)); | 472 i.GetCurrentValue()->Send(new ViewMsg_SetIPCLoggingEnabled(enable)); |
| 473 } | 473 } |
| 474 | 474 |
| 475 // Helper for SetIPCLoggingEnabled. | 475 // Helper for SetIPCLoggingEnabled. |
| 476 void BrowserProcessImpl::SetIPCLoggingEnabledForChildProcesses(bool enabled) { | 476 void BrowserProcessImpl::SetIPCLoggingEnabledForChildProcesses(bool enabled) { |
| 477 DCHECK(MessageLoop::current() == | 477 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); |
| 478 ChromeThread::GetMessageLoop(ChromeThread::IO)); | |
| 479 | 478 |
| 480 ChildProcessHost::Iterator i; // default constr references a singleton | 479 ChildProcessHost::Iterator i; // default constr references a singleton |
| 481 while (!i.Done()) { | 480 while (!i.Done()) { |
| 482 i->Send(new PluginProcessMsg_SetIPCLoggingEnabled(enabled)); | 481 i->Send(new PluginProcessMsg_SetIPCLoggingEnabled(enabled)); |
| 483 ++i; | 482 ++i; |
| 484 } | 483 } |
| 485 } | 484 } |
| 486 | 485 |
| 487 #endif // IPC_MESSAGE_LOG_ENABLED | 486 #endif // IPC_MESSAGE_LOG_ENABLED |
| 488 | 487 |
| 489 void BrowserProcessImpl::DoInspectorFilesCheck() { | 488 void BrowserProcessImpl::DoInspectorFilesCheck() { |
| 490 // Runs on FILE thread. | 489 // Runs on FILE thread. |
| 491 DCHECK(file_thread_->message_loop() == MessageLoop::current()); | 490 DCHECK(file_thread_->message_loop() == MessageLoop::current()); |
| 492 bool result = false; | 491 bool result = false; |
| 493 | 492 |
| 494 FilePath inspector_dir; | 493 FilePath inspector_dir; |
| 495 if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { | 494 if (PathService::Get(chrome::DIR_INSPECTOR, &inspector_dir)) { |
| 496 result = file_util::PathExists(inspector_dir); | 495 result = file_util::PathExists(inspector_dir); |
| 497 } | 496 } |
| 498 | 497 |
| 499 have_inspector_files_ = result; | 498 have_inspector_files_ = result; |
| 500 } | 499 } |
| OLD | NEW |