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

Side by Side Diff: chrome/app/chrome_dll_main.cc

Issue 28171: Wire up resource bundles on the mac:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | chrome/common/resource_bundle_mac.mm » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // TODO(port): the ifdefs in here are a first step towards trying to determine 5 // TODO(port): the ifdefs in here are a first step towards trying to determine
6 // the correct abstraction for all the OS functionality required at this 6 // the correct abstraction for all the OS functionality required at this
7 // stage of process initialization. It should not be taken as a final 7 // stage of process initialization. It should not be taken as a final
8 // abstraction. 8 // abstraction.
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // present, bailing out of the app we can't. 162 // present, bailing out of the app we can't.
163 void EnableHeapProfiler(const CommandLine& parsed_command_line) { 163 void EnableHeapProfiler(const CommandLine& parsed_command_line) {
164 #if defined(OS_WIN) 164 #if defined(OS_WIN)
165 if (parsed_command_line.HasSwitch(switches::kMemoryProfiling)) 165 if (parsed_command_line.HasSwitch(switches::kMemoryProfiling))
166 if (!LoadMemoryProfiler()) 166 if (!LoadMemoryProfiler())
167 exit(-1); 167 exit(-1);
168 #endif 168 #endif
169 } 169 }
170 170
171 void CommonSubprocessInit() { 171 void CommonSubprocessInit() {
172 #if defined(OS_WIN) || defined(OS_LINUX)
173 // Initialize ResourceBundle which handles files loaded from external 172 // Initialize ResourceBundle which handles files loaded from external
174 // sources. The language should have been passed in to us from the 173 // sources. The language should have been passed in to us from the
175 // browser process as a command line flag. 174 // browser process as a command line flag.
176 // TODO(port-mac): enable when we figure out resource bundle issues
177 ResourceBundle::InitSharedInstance(std::wstring()); 175 ResourceBundle::InitSharedInstance(std::wstring());
178 #endif
179 176
180 #if defined(OS_WIN) 177 #if defined(OS_WIN)
181 // HACK: Let Windows know that we have started. This is needed to suppress 178 // HACK: Let Windows know that we have started. This is needed to suppress
182 // the IDC_APPSTARTING cursor from being displayed for a prolonged period 179 // the IDC_APPSTARTING cursor from being displayed for a prolonged period
183 // while a subprocess is starting. 180 // while a subprocess is starting.
184 PostThreadMessage(GetCurrentThreadId(), WM_NULL, 0, 0); 181 PostThreadMessage(GetCurrentThreadId(), WM_NULL, 0, 0);
185 MSG msg; 182 MSG msg;
186 PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); 183 PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
187 #endif 184 #endif
188 } 185 }
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 rv = PluginMain(main_params); 320 rv = PluginMain(main_params);
324 #endif 321 #endif
325 } else if (process_type.empty()) { 322 } else if (process_type.empty()) {
326 ScopedOleInitializer ole_initializer; 323 ScopedOleInitializer ole_initializer;
327 rv = BrowserMain(main_params); 324 rv = BrowserMain(main_params);
328 } else { 325 } else {
329 NOTREACHED() << "Unknown process type"; 326 NOTREACHED() << "Unknown process type";
330 } 327 }
331 328
332 if (!process_type.empty()) { 329 if (!process_type.empty()) {
333 #if defined(OS_WIN) || defined(OS_LINUX)
334 // TODO(port-mac): enable when we figure out resource bundle issues
335 ResourceBundle::CleanupSharedInstance(); 330 ResourceBundle::CleanupSharedInstance();
336 #endif
337 } 331 }
338 332
339 #if defined(OS_WIN) 333 #if defined(OS_WIN)
340 #ifdef _CRTDBG_MAP_ALLOC 334 #ifdef _CRTDBG_MAP_ALLOC
341 _CrtDumpMemoryLeaks(); 335 _CrtDumpMemoryLeaks();
342 #endif // _CRTDBG_MAP_ALLOC 336 #endif // _CRTDBG_MAP_ALLOC
343 337
344 _Module.Term(); 338 _Module.Term();
345 #endif 339 #endif
346 340
347 logging::CleanupChromeLogging(); 341 logging::CleanupChromeLogging();
348 342
349 return rv; 343 return rv;
350 } 344 }
351 345
352 346
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_main.cc » ('j') | chrome/common/resource_bundle_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698