Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: services/shell/runner/init.cc

Issue 1989333002: Fix icu_use_data_file = false. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update DEPS for ICU. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/shell/public/cpp/lib/initialize_base_and_icu.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 mojo application wants.
79
80 #if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
79 typedef void (*LibraryEarlyInitFunction)(const uint8_t*); 81 typedef void (*LibraryEarlyInitFunction)(const uint8_t*);
80 LibraryEarlyInitFunction init_function = 82 LibraryEarlyInitFunction init_function =
81 reinterpret_cast<LibraryEarlyInitFunction>( 83 reinterpret_cast<LibraryEarlyInitFunction>(
82 base::GetFunctionPointerFromNativeLibrary(app_library, 84 base::GetFunctionPointerFromNativeLibrary(app_library,
83 "InitializeBase")); 85 "InitializeBase"));
84 if (init_function) { 86 if (init_function) {
85 // 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
86 // 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.
87 const uint8_t* icu_data = base::i18n::GetRawIcuMemory(); 89 const uint8_t* icu_data = base::i18n::GetRawIcuMemory();
88 init_function(icu_data); 90 init_function(icu_data);
89 } 91 }
92 #endif // ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
90 93
91 // TODO(erg): All chromium binaries load base. We might want to make a 94 // TODO(erg): All chromium binaries load base. We might want to make a
92 // general system for other people. 95 // general system for other people.
93 } 96 }
94 97
95 } // namespace shell 98 } // namespace shell
OLDNEW
« no previous file with comments | « services/shell/public/cpp/lib/initialize_base_and_icu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698