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 #include "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <sys/types.h> | |
9 #include <sys/wait.h> | |
8 | 10 |
9 #include "base/allocator/allocator_extension.h" | 11 #include "base/allocator/allocator_extension.h" |
10 #include "base/at_exit.h" | 12 #include "base/at_exit.h" |
11 #include "base/command_line.h" | 13 #include "base/command_line.h" |
12 #include "base/debug/debugger.h" | 14 #include "base/debug/debugger.h" |
13 #include "base/debug/trace_event.h" | 15 #include "base/debug/trace_event.h" |
14 #include "base/files/file_path.h" | 16 #include "base/files/file_path.h" |
15 #include "base/i18n/icu_util.h" | 17 #include "base/i18n/icu_util.h" |
16 #include "base/lazy_instance.h" | 18 #include "base/lazy_instance.h" |
17 #include "base/logging.h" | 19 #include "base/logging.h" |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
779 | 781 |
780 _Module.Term(); | 782 _Module.Term(); |
781 #endif // OS_WIN | 783 #endif // OS_WIN |
782 | 784 |
783 #if defined(OS_MACOSX) | 785 #if defined(OS_MACOSX) |
784 autorelease_pool_.reset(NULL); | 786 autorelease_pool_.reset(NULL); |
785 #endif | 787 #endif |
786 | 788 |
787 exit_manager_.reset(NULL); | 789 exit_manager_.reset(NULL); |
788 | 790 |
791 // Wait for children to exit if --child-clean-exit is passed. | |
792 if (CommandLine::ForCurrentProcess()-> | |
793 HasSwitch(switches::kChildCleanExit)) { | |
794 while (wait(NULL) != -1); | |
Markus (顧孟勤)
2013/07/22 22:50:13
Minor nit-pick (feel free to avoid).
This looks v
asharif1
2013/07/22 23:43:54
I can easily make this change, but please comment
asharif1
2013/07/24 15:17:23
Done.
| |
795 } | |
796 | |
797 | |
789 delegate_ = NULL; | 798 delegate_ = NULL; |
790 is_shutdown_ = true; | 799 is_shutdown_ = true; |
791 } | 800 } |
792 | 801 |
793 private: | 802 private: |
794 // True if the runner has been initialized. | 803 // True if the runner has been initialized. |
795 bool is_initialized_; | 804 bool is_initialized_; |
796 | 805 |
797 // True if the runner has been shut down. | 806 // True if the runner has been shut down. |
798 bool is_shutdown_; | 807 bool is_shutdown_; |
(...skipping 16 matching lines...) Expand all Loading... | |
815 | 824 |
816 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 825 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
817 }; | 826 }; |
818 | 827 |
819 // static | 828 // static |
820 ContentMainRunner* ContentMainRunner::Create() { | 829 ContentMainRunner* ContentMainRunner::Create() { |
821 return new ContentMainRunnerImpl(); | 830 return new ContentMainRunnerImpl(); |
822 } | 831 } |
823 | 832 |
824 } // namespace content | 833 } // namespace content |
OLD | NEW |