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 | 8 |
9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 DCHECK(!is_shutdown_); | 805 DCHECK(!is_shutdown_); |
806 | 806 |
807 if (completed_basic_startup_ && delegate_) { | 807 if (completed_basic_startup_ && delegate_) { |
808 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 808 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
809 std::string process_type = | 809 std::string process_type = |
810 command_line.GetSwitchValueASCII(switches::kProcessType); | 810 command_line.GetSwitchValueASCII(switches::kProcessType); |
811 | 811 |
812 delegate_->ProcessExiting(process_type); | 812 delegate_->ProcessExiting(process_type); |
813 } | 813 } |
814 | 814 |
| 815 #if defined(USE_MOJO) |
| 816 ShutdownMojo(); |
| 817 #endif |
| 818 |
815 #if defined(OS_WIN) | 819 #if defined(OS_WIN) |
816 #ifdef _CRTDBG_MAP_ALLOC | 820 #ifdef _CRTDBG_MAP_ALLOC |
817 _CrtDumpMemoryLeaks(); | 821 _CrtDumpMemoryLeaks(); |
818 #endif // _CRTDBG_MAP_ALLOC | 822 #endif // _CRTDBG_MAP_ALLOC |
819 | 823 |
820 _Module.Term(); | 824 _Module.Term(); |
821 #endif // OS_WIN | 825 #endif // OS_WIN |
822 | 826 |
823 #if defined(OS_MACOSX) | 827 #if defined(OS_MACOSX) |
824 autorelease_pool_.reset(NULL); | 828 autorelease_pool_.reset(NULL); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 | 861 |
858 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 862 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
859 }; | 863 }; |
860 | 864 |
861 // static | 865 // static |
862 ContentMainRunner* ContentMainRunner::Create() { | 866 ContentMainRunner* ContentMainRunner::Create() { |
863 return new ContentMainRunnerImpl(); | 867 return new ContentMainRunnerImpl(); |
864 } | 868 } |
865 | 869 |
866 } // namespace content | 870 } // namespace content |
OLD | NEW |