OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "services/shell/runner/init.h" | 5 #include "services/shell/runner/init.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 MessageBox(NULL, message.c_str(), appw.c_str(), MB_OK | MB_SETFOREGROUND); | 68 MessageBox(NULL, message.c_str(), appw.c_str(), MB_OK | MB_SETFOREGROUND); |
69 #else | 69 #else |
70 LOG(ERROR) << app << " waiting for GDB. pid: " << getpid(); | 70 LOG(ERROR) << app << " waiting for GDB. pid: " << getpid(); |
71 base::debug::WaitForDebugger(60, true); | 71 base::debug::WaitForDebugger(60, true); |
72 #endif | 72 #endif |
73 } | 73 } |
74 } | 74 } |
75 } | 75 } |
76 | 76 |
77 void CallLibraryEarlyInitialization(base::NativeLibrary app_library) { | 77 void CallLibraryEarlyInitialization(base::NativeLibrary app_library) { |
78 // Do whatever warming that the mojo application wants. | 78 // Do whatever warming that the service wants. |
79 | 79 |
80 #if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE | 80 #if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE |
81 typedef void (*LibraryEarlyInitFunction)(const uint8_t*); | 81 typedef void (*LibraryEarlyInitFunction)(const uint8_t*); |
82 LibraryEarlyInitFunction init_function = | 82 LibraryEarlyInitFunction init_function = |
83 reinterpret_cast<LibraryEarlyInitFunction>( | 83 reinterpret_cast<LibraryEarlyInitFunction>( |
84 base::GetFunctionPointerFromNativeLibrary(app_library, | 84 base::GetFunctionPointerFromNativeLibrary(app_library, |
85 "InitializeBase")); | 85 "InitializeBase")); |
86 CHECK(init_function); | 86 CHECK(init_function); |
87 // Get the ICU data that we prewarmed in the runner and then pass it to | 87 // Get the ICU data that we prewarmed in the runner and then pass it to |
88 // the copy of icu in the mojo binary that we're running. | 88 // the copy of icu in the mojo binary that we're running. |
89 const uint8_t* icu_data = base::i18n::GetRawIcuMemory(); | 89 const uint8_t* icu_data = base::i18n::GetRawIcuMemory(); |
90 init_function(icu_data); | 90 init_function(icu_data); |
91 #endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE | 91 #endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE |
92 | 92 |
93 // TODO(erg): All chromium binaries load base. We might want to make a | 93 // TODO(erg): All chromium binaries load base. We might want to make a |
94 // general system for other people. | 94 // general system for other people. |
95 } | 95 } |
96 | 96 |
97 } // namespace shell | 97 } // namespace shell |
OLD | NEW |