OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/lazy_instance.h" | 6 #include "base/lazy_instance.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/metrics/stats_counters.h" | 8 #include "base/metrics/stats_counters.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 #define DLLEXPORT __declspec(dllexport) | 114 #define DLLEXPORT __declspec(dllexport) |
115 | 115 |
116 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. | 116 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. |
117 extern "C" { | 117 extern "C" { |
118 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, | 118 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, |
119 sandbox::SandboxInterfaceInfo* sandbox_info); | 119 sandbox::SandboxInterfaceInfo* sandbox_info); |
120 } | 120 } |
121 #elif defined(OS_POSIX) | 121 #elif defined(OS_POSIX) |
122 extern "C" { | 122 extern "C" { |
123 __attribute__((visibility("default"))) | 123 __attribute__((visibility("default"))) |
124 int ChromeMain(int argc, char** argv); | 124 int ChromeMain(int argc, const char** argv); |
125 } | 125 } |
126 #endif | 126 #endif |
127 | 127 |
128 namespace { | 128 namespace { |
129 | 129 |
130 #if defined(OS_WIN) | 130 #if defined(OS_WIN) |
131 const wchar_t kProfilingDll[] = L"memory_watcher.dll"; | 131 const wchar_t kProfilingDll[] = L"memory_watcher.dll"; |
132 | 132 |
133 // Load the memory profiling DLL. All it needs to be activated | 133 // Load the memory profiling DLL. All it needs to be activated |
134 // is to be loaded. Return true on success, false otherwise. | 134 // is to be loaded. Return true on success, false otherwise. |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 }; | 752 }; |
753 | 753 |
754 } // namespace | 754 } // namespace |
755 | 755 |
756 #if defined(OS_WIN) | 756 #if defined(OS_WIN) |
757 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, | 757 DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance, |
758 sandbox::SandboxInterfaceInfo* sandbox_info) { | 758 sandbox::SandboxInterfaceInfo* sandbox_info) { |
759 ChromeMainDelegate chrome_main_delegate; | 759 ChromeMainDelegate chrome_main_delegate; |
760 return content::ContentMain(instance, sandbox_info, &chrome_main_delegate); | 760 return content::ContentMain(instance, sandbox_info, &chrome_main_delegate); |
761 #elif defined(OS_POSIX) | 761 #elif defined(OS_POSIX) |
762 int ChromeMain(int argc, char** argv) { | 762 int ChromeMain(int argc, const char** argv) { |
763 ChromeMainDelegate chrome_main_delegate; | 763 ChromeMainDelegate chrome_main_delegate; |
764 return content::ContentMain(argc, argv, &chrome_main_delegate); | 764 return content::ContentMain(argc, argv, &chrome_main_delegate); |
765 #endif | 765 #endif |
766 } | 766 } |
OLD | NEW |